1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
export DH_COMPAT=3
export DH_OPTIONS
prefix := /usr
configure: configure-stamp
configure-stamp:
dh_testdir
cp config.sub config.sub.orig
cp config.guess config.guess.orig
cp /usr/share/misc/config.{sub,guess} .
(./configure --prefix=${prefix} \
--mandir=${prefix}/share/man \
--infodir=${prefix}/share/info \
--with-iconsdir=${prefix}/share/pixmaps/fwbuilder \
--with-docdir=${prefix}/share/doc/fwbuilder-doc \
--localstatedir=/var \
--sharedstatedir=/var \
--sysconfdir=/etc \
${DEB_HOST_GNU_TYPE})
touch configure-stamp
build: configure build-stamp
build-stamp:
dh_testdir
$(MAKE)
$(MAKE) -s -f debian/rules buildinfo
touch build-stamp
clean: clean1
clean1:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -f buildinfo.Debian
-$(MAKE) distclean
test -e config.sub.orig && mv config.sub.orig config.sub || true
test -e config.guess.orig && mv config.guess.orig config.guess || true
dh_clean
dtmp := $(CURDIR)/debian/tmp
# Use DESTDIR when upstream stabilizes their install paths
install_defs := DESTDIR=${dtmp}
#install_defs := prefix=${dtmp}/usr \
# localstatedir=${dtmp}/var \
# sharedstatedir=${dtmp}/var \
# sysconfdir=${dtmp}/etc \
# docdir=${dtmp}/usr/share/doc/fwbuilder-doc
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install ${install_defs}
cd examples && $(MAKE) install ${install_defs}
chown root.root ${dtmp}/usr/share/fwbuilder/* ${dtmp}/usr/include/*
chmod u=rw,go=r ${dtmp}/usr/share/fwbuilder/* ${dtmp}/usr/include/*
# Remove to satisfy Policy Manual section 13.6
find ${dtmp} -name COPYING -exec rm {} \;
# Remove to satisfy lintian
find ${dtmp} -name INSTALL -exec rm {} \;
# Rename to satisfy Policy Manual section 13.8
find ${dtmp} -name ChangeLog -exec mv {} changelog \;
dh_movefiles
# mv `pwd`/debian/fwbuilder-doc/usr/share/doc/fwbuilder-* \
# `pwd`/debian/fwbuilder-doc/usr/share/doc/fwbuilder-doc
install -d `pwd`/debian/fwbuilder-iptables/usr/share/lintian/overrides
install -m 0644 debian/fwbuilder-iptables.override \
`pwd`/debian/fwbuilder-iptables/usr/share/lintian/overrides/fwbuilder-iptables
binary-indep: DH_OPTIONS=-i
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: DH_OPTIONS=-a
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_installman
dh_undocumented
dh_installchangelogs
dh_strip
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
buildinfo:
@echo; COLUMNS=200 dpkg -l \
debhelper \
libfwbuilder-dev \
libxml2-dev \
libxslt1-dev \
libglib1.2-dev \
libgtk1.2-dev \
libgtkxmhtml-dev \
libgtkmm-dev \
libgnome-dev \
libsigc++-dev \
liborbit-dev \
libgnorba-dev \
libsnmp4.2-dev \
libpopt-dev \
libzvt-dev \
xlibs-dev \
autotools-dev \
$(BUILDINFO) \
| awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
| tee buildinfo.Debian; echo
@chmod 644 buildinfo.Debian
patch: patch-stamp
patch-stamp:
test -d debian/patched || install -d debian/patched
@echo "Patches applied in the Debian version of fwbuilder:" > $@T
@for patch in `cat debian/patches/00list`; do \
stamp=debian/patched/$$patch.dpatch; \
patch=debian/patches/$$patch.dpatch; \
test -x $$patch || chmod +x $$patch; \
if test -f $$stamp; then \
echo "$$patch already applied."; \
echo -e "\n$$patch:" >> $@T; \
sed -n 's/^## *DP: */ /p' $$patch > $@T; \
else \
echo "trying to apply patch $$patch..."; \
if $$patch -patch >$$stamp.new 2>&1; then \
mv $$stamp.new $$stamp; \
touch $$stamp; \
echo -e "\n$$patch:" >> $@T; \
sed -n 's/^## *DP: */ /p' $$patch >> $@T; \
else \
echo "error in applying $$patch patch."; \
exit 1; \
fi; \
fi; \
done
mv -f $@T $@
unpatch:
@for patch in `tac debian/patches/00list`; do \
stamp=debian/patched/$$patch.dpatch; \
patch=debian/patches/$$patch.dpatch; \
test -x $$patch || chmod +x $$patch; \
if test -f $$stamp; then \
echo "trying to revert patch $$patch..."; \
if $$patch -unpatch 2>&1 >/dev/null; then \
rm -r $$stamp; \
else \
echo "error in reverting $$patch patch."; \
exit 1; \
fi; \
fi; \
done
rm -f patch-stamp
.PHONY: build clean binary-indep binary-arch binary install configure
|