]> git.proxmox.com Git - mirror_spl-debian.git/blob - config/deb.am
75e31dfec213d11ff3b384ceeaf1d7741baca91c
[mirror_spl-debian.git] / config / deb.am
1 ###############################################################################
2 # Copyright (C) 2010 Lawrence Livermore National Security, LLC.
3 # Written by Brian Behlendorf <behlendorf1@llnl.gov>.
4 ###############################################################################
5 # Build targets for DEB packages.
6 #
7 # Long term native distro specific Debian style packaging should be added.
8 # In the short term RPM packages are built and converted to DEB packages
9 # using alien. If someone familiar with Debian style packaging were to
10 # update the build system to correctly build Debian style packages I would
11 # happily take it. Until then we will have to make due with alien.
12 #
13 ###############################################################################
14
15 deb-local:
16 @(if test "${HAVE_DPKGBUILD}" = "no"; then \
17 echo -e "\n" \
18 "*** Required util ${DPKGBUILD} missing. Please install the\n" \
19 "*** package for your distribution which provides ${DPKGBUILD},\n" \
20 "*** re-run configure, and try again.\n"; \
21 exit 1; \
22 fi; \
23 if test "${HAVE_ALIEN}" = "no"; then \
24 echo -e "\n" \
25 "*** Required util ${ALIEN} missing. Please install the\n" \
26 "*** package for your distribution which provides ${ALIEN},\n" \
27 "*** re-run configure, and try again.\n"; \
28 exit 1; \
29 fi)
30
31 deb-modules: deb-local rpm-modules
32 if CONFIG_KERNEL
33 name=${PACKAGE}-modules; \
34 version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
35 release=`echo ${LINUX_VERSION} | $(SED) -e "s/-/_/g"`; \
36 arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
37 pkg1=$${name}-$${version}_$${release}.$${arch}.rpm; \
38 pkg2=$${name}-devel-$${version}_$${release}.$${arch}.rpm; \
39 fakeroot $(ALIEN) --scripts --to-deb $$pkg1 $$pkg2; \
40 $(RM) $$pkg1 $$pkg2
41 endif
42
43 deb-utils: deb-local rpm-utils
44 if CONFIG_USER
45 name=${PACKAGE}; \
46 version=${SPL_META_VERSION}-${SPL_META_RELEASE}; \
47 arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
48 pkg1=$${name}-$${version}.$${arch}.rpm; \
49 fakeroot $(ALIEN) --scripts --to-deb $$pkg1; \
50 $(RM) $$pkg1
51 endif
52
53 deb: deb-modules deb-utils