| author | Tomas Zeman <tzeman@volny.cz> |
| Thu, 29 May 2008 16:01:24 +0200 | |
| changeset 25 | 7010e267c646 |
| parent 21 | 8f7c8cb144bc |
| permissions | -rw-r--r-- |
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
1 |
drbd-module-0.7 |
| 1 | 2 |
diff --git a/source/custom/drbd-module/FrugalBuild b/source/custom/drbd-module/FrugalBuild |
3 |
new file mode 100644 |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
4 |
index 0000000..49eaf89 |
| 1 | 5 |
--- /dev/null |
6 |
+++ b/source/custom/drbd-module/FrugalBuild |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
7 |
@@ -0,0 +1,36 @@ |
| 1 | 8 |
+# Maintainer: Tomas Zeman <tzeman@volny.cz> |
9 |
+ |
|
10 |
+pkgorig=drbd |
|
11 |
+pkgname=$pkgorig-module |
|
|
12
f88bf9dd05ce
drbd-module: downgrade 8.0 -> 0.7.25
Tomas Zeman <tzeman@volny.cz>
parents:
1
diff
changeset
|
12 |
+pkgver=0.7.25 |
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
13 |
+pkgrel=2 |
| 1 | 14 |
+pkgdesc="block device mirroring a whole block device via network; network raid-1 implementation" |
15 |
+url="http://www.drbd.org" |
|
16 |
+license="GPL" |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
17 |
+depends=(kernel-source gcc make "kernel=2.6.24") |
| 1 | 18 |
+archs=(i686) |
19 |
+install=drbd.install |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
20 |
+_F_scm_type="git" |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
21 |
+_F_scm_url="git://git.drbd.org/drbd-0.7.git" |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
22 |
+_F_scm_tag="fe0c05db16a4dbdc6cfcb20c68b2f61a7793df1a" |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
23 |
+Finclude scm |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
24 |
+ |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
25 |
+#up2date="lynx -dump -nolist http://oss.linbit.com/drbd/|grep drbd-0.7|grep tar.gz|head -1|sed -e 's/^.*drbd-\(.*\)\.tar\.gz.*$/\1/'" |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
26 |
+#source=(http://oss.linbit.com/drbd/0.7/$pkgorig-$pkgver.tar.gz 'http://git.drbd.org/?p=drbd-0.7.git;a=commitdiff_plain;h=fe0c05db16a4dbdc6cfcb20c68b2f61a7793df1a') |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
27 |
+#sha1sums=('9f507ffd41306409357e1eb4e6f73e3671acad28')
|
| 1 | 28 |
+ |
29 |
+ |
|
30 |
+build() {
|
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
31 |
+ Funpack_scm |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
32 |
+ #Fcd $pkgorig-$pkgver |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
33 |
+ #mkdir -p $startdir/pkg/usr/src/$pkgname |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
34 |
+ #cp -aR drbd $startdir/pkg/usr/src/$pkgname |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
35 |
+ #cp -aR scripts $startdir/pkg/usr/src/$pkgname |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
36 |
+ Fcd || Fdie |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
37 |
+ cd drbd |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
38 |
+ make clean |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
39 |
+ make KDIR=/usr/src/linux-`uname -r` || Fdie |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
40 |
+ make install PREFIX=$startdir/pkg || Fdie |
| 1 | 41 |
+} |
42 |
+ |
|
43 |
+# vim: ft=sh |
|
44 |
diff --git a/source/custom/drbd-module/drbd.install b/source/custom/drbd-module/drbd.install |
|
45 |
new file mode 100644 |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
46 |
index 0000000..06437f2 |
| 1 | 47 |
--- /dev/null |
48 |
+++ b/source/custom/drbd-module/drbd.install |
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
49 |
@@ -0,0 +1,41 @@ |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
50 |
+ |
| 1 | 51 |
+# This is a default template for a post-install scriptlet. You can |
52 |
+# remove any functions you don't need (and this header). |
|
53 |
+ |
|
54 |
+# arg 1: the new package version |
|
55 |
+pre_install() {
|
|
56 |
+ /bin/true |
|
57 |
+} |
|
58 |
+ |
|
59 |
+# arg 1: the new package version |
|
60 |
+post_install() {
|
|
61 |
+ post_upgrade $1 |
|
62 |
+} |
|
63 |
+ |
|
64 |
+# arg 1: the new package version |
|
65 |
+# arg 2: the old package version |
|
66 |
+pre_upgrade() {
|
|
67 |
+ /bin/true |
|
68 |
+} |
|
69 |
+ |
|
70 |
+# arg 1: the new package version |
|
71 |
+# arg 2: the old package version |
|
72 |
+post_upgrade() {
|
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
73 |
+ DRBD_OBJ=/lib/modules/`uname -r`/kernel/drivers/block/drbd.ko |
|
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
74 |
+ /sbin/depmod -a || /sbin/depmod -e $DRBD_OBJ |
| 1 | 75 |
+} |
76 |
+ |
|
77 |
+# arg 1: the old package version |
|
78 |
+pre_remove() {
|
|
79 |
+ /bin/true |
|
80 |
+} |
|
81 |
+ |
|
82 |
+# arg 1: the old package version |
|
83 |
+post_remove() {
|
|
|
21
8f7c8cb144bc
drbd-module.patch: make it compile on 2.6.24 + compile on module build, not while installing
Tomas Zeman <tzeman@volny.cz>
parents:
12
diff
changeset
|
84 |
+ /sbin/depmod -a |
| 1 | 85 |
+} |
86 |
+ |
|
87 |
+op=$1 |
|
88 |
+shift |
|
89 |
+$op $* |
|
90 |
+ |