]>
Commit | Line | Data |
---|---|---|
e6c093dd AS |
1 | PHONY += deb-kmod deb-dkms deb-utils deb deb-local |
2 | ||
c9c0d073 BB |
3 | deb-local: |
4 | @(if test "${HAVE_DPKGBUILD}" = "no"; then \ | |
5 | echo -e "\n" \ | |
6 | "*** Required util ${DPKGBUILD} missing. Please install the\n" \ | |
e921f650 | 7 | "*** package for your distribution which provides ${DPKGBUILD},\n" \ |
c9c0d073 | 8 | "*** re-run configure, and try again.\n"; \ |
e921f650 | 9 | exit 1; \ |
c9c0d073 BB |
10 | fi; \ |
11 | if test "${HAVE_ALIEN}" = "no"; then \ | |
12 | echo -e "\n" \ | |
13 | "*** Required util ${ALIEN} missing. Please install the\n" \ | |
e921f650 | 14 | "*** package for your distribution which provides ${ALIEN},\n" \ |
c9c0d073 | 15 | "*** re-run configure, and try again.\n"; \ |
e921f650 | 16 | exit 1; \ |
c9c0d073 BB |
17 | fi) |
18 | ||
f3757573 | 19 | deb-kmod: deb-local rpm-kmod |
f3757573 BB |
20 | name=${PACKAGE}; \ |
21 | version=${VERSION}-${RELEASE}; \ | |
22 | arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \ | |
79c32704 | 23 | debarch=`$(DPKG) --print-architecture`; \ |
f3757573 | 24 | pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \ |
a54f92b4 | 25 | fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \ |
f3757573 | 26 | $(RM) $$pkg1 |
7670f721 NG |
27 | |
28 | ||
29 | deb-dkms: deb-local rpm-dkms | |
30 | name=${PACKAGE}; \ | |
31 | version=${VERSION}-${RELEASE}; \ | |
32 | arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \ | |
79c32704 | 33 | debarch=`$(DPKG) --print-architecture`; \ |
7670f721 | 34 | pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \ |
a54f92b4 | 35 | fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \ |
7670f721 | 36 | $(RM) $$pkg1 |
c9c0d073 | 37 | |
d0cea309 | 38 | deb-utils: deb-local rpm-utils-initramfs |
c9c0d073 | 39 | name=${PACKAGE}; \ |
f3757573 | 40 | version=${VERSION}-${RELEASE}; \ |
bd2f5ac9 | 41 | arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \ |
79c32704 | 42 | debarch=`$(DPKG) --print-architecture`; \ |
c9c0d073 | 43 | pkg1=$${name}-$${version}.$${arch}.rpm; \ |
8434017a AR |
44 | pkg2=libnvpair3-$${version}.$${arch}.rpm; \ |
45 | pkg3=libuutil3-$${version}.$${arch}.rpm; \ | |
46 | pkg4=libzfs4-$${version}.$${arch}.rpm; \ | |
47 | pkg5=libzpool4-$${version}.$${arch}.rpm; \ | |
48 | pkg6=libzfs4-devel-$${version}.$${arch}.rpm; \ | |
c9b5cc8c | 49 | pkg7=$${name}-test-$${version}.$${arch}.rpm; \ |
a54f92b4 | 50 | pkg8=$${name}-dracut-$${version}.noarch.rpm; \ |
48511ea6 | 51 | pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \ |
6e72a5b9 | 52 | pkg10=`ls python*-pyzfs-$${version}* | tail -1`; \ |
c34efbeb AR |
53 | ## Arguments need to be passed to dh_shlibdeps. Alien provides no mechanism |
54 | ## to do this, so we install a shim onto the path which calls the real | |
55 | ## dh_shlibdeps with the required arguments. | |
9109b89c | 56 | path_prepend=`mktemp -d /tmp/intercept.XXXXXX`; \ |
c34efbeb AR |
57 | echo "#$(SHELL)" > $${path_prepend}/dh_shlibdeps; \ |
58 | echo "`which dh_shlibdeps` -- \ | |
8434017a | 59 | -xlibuutil3linux -xlibnvpair3linux -xlibzfs4linux -xlibzpool4linux" \ |
c34efbeb AR |
60 | >> $${path_prepend}/dh_shlibdeps; \ |
61 | ## These -x arguments are passed to dpkg-shlibdeps, which exclude the | |
62 | ## Debianized packages from the auto-generated dependencies of the new debs, | |
63 | ## which should NOT be mixed with the alien-generated debs created here | |
64 | chmod +x $${path_prepend}/dh_shlibdeps; \ | |
65 | env PATH=$${path_prepend}:$${PATH} \ | |
79c32704 | 66 | fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch \ |
48511ea6 | 67 | $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \ |
a54f92b4 | 68 | $$pkg8 $$pkg9 $$pkg10 || exit 1; \ |
c34efbeb AR |
69 | $(RM) $${path_prepend}/dh_shlibdeps; \ |
70 | rmdir $${path_prepend}; \ | |
48511ea6 | 71 | $(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \ |
85ce3f4f | 72 | $$pkg8 $$pkg9 $$pkg10; |
c9c0d073 | 73 | |
7670f721 | 74 | deb: deb-kmod deb-dkms deb-utils |