You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

98 lines
2.6 KiB

#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PACKAGES=$(shell dh_listpackages)
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
ARCH=$(shell dpkg --print-architecture)
DHCP_PACKAGES=netcfg netcfg-dhcp
# This is the debhelper compatability version to use.
export DH_COMPAT=2
# Udebs have no postrm file, don't make one
export DH_OPTIONS=-n
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
rm -f debian/netcfg-dhcp.postinst debian/netcfg-static.postinst \
debian/netcfg.postinst
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
# Install files that are the same in all packages
$(foreach PACKAGE, $(PACKAGES), \
cp $(PACKAGE) debian/$(PACKAGE).postinst ; \
mkdir -p debian/$(PACKAGE)/etc/network ; \
mkdir -p debian/$(PACKAGE)/usr/lib/prebaseconfig.d ; \
install -m 755 prebaseconfig \
debian/$(PACKAGE)/usr/lib/prebaseconfig.d/40netcfg ; )
# Install files that are in all DHCP packages
$(foreach PACKAGE, $(DHCP_PACKAGES), \
mkdir -p debian/$(PACKAGE)/usr/share/udhcpc ; \
install -m755 udhcpc.default.script debian/$(PACKAGE)/usr/share/udhcpc/default.script ; \
mkdir -p debian/$(PACKAGE)/etc/dhcp ; \
mkdir -p debian/$(PACKAGE)/var/dhcp ; )
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdebconf
(echo ; po2debconf debian/netcfg-common.templates ) \
>> debian/netcfg-static/DEBIAN/templates
(echo ; po2debconf debian/netcfg-common.templates )\
>> debian/netcfg-dhcp/DEBIAN/templates
(echo ; po2debconf debian/netcfg-common.templates )\
>> debian/netcfg/DEBIAN/templates
(echo ; po2debconf debian/netcfg-dhcp.templates )\
>> debian/netcfg/DEBIAN/templates
(echo ; po2debconf debian/netcfg-static.templates )\
>> debian/netcfg/DEBIAN/templates
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
$(foreach PACKAGE, $(PACKAGES), \
( dpkg-gencontrol -Pdebian/$(PACKAGE) -isp -p$(PACKAGE) \
-Tdebian/$(PACKAGE).substvars \
-n$(PACKAGE)_$(VERSION)_$(ARCH).udeb ) ; )
$(foreach PACKAGE, $(PACKAGES), \
(cd debian ; \
dpkg-deb -b $(PACKAGE) ../../$(PACKAGE)_$(VERSION)_$(ARCH).udeb \
); )
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install