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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_COMPAT=4
# Build options.
CC=gcc
CFLAGS= -g -Wall -fPIC -DCONF_FILE=\"/etc/pam_radius_auth.conf\"
LDFLAGS=
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq ($(DEB_HOST_GNU_CPU),(hppa|m68k|mips|powerpc|s390|sparc|sparc64|sheb))
CFLAGS += -DHIGHFIRST
endif
export CFLAGS
export LDFLAGS
export CC
build: patch build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
$(MAKE) -e
touch build-stamp
patch:
if [ ! -f patch-stamp ]; then \
patch -p1 < debian/patches/001.fix_Makefile.diff && \
patch -p1 < debian/patches/002.CAN2005-0108.diff && \
touch patch-stamp; \
fi
unpatch:
if [ -f patch-stamp ]; then \
patch -Rp1 < debian/patches/002.CAN2005-0108.diff && \
patch -Rp1 < debian/patches/001.fix_Makefile.diff && \
rm -f patch-stamp; \
fi
clean: unpatch real-clean
real-clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs /lib /lib/security /etc /usr/share/doc/libpam-radius-auth/html
install -p pam_radius_auth.so debian/libpam-radius-auth/lib/security/pam_radius_auth.so
install -p pam_radius_auth.conf debian/libpam-radius-auth/etc/pam_radius_auth.conf
install -p index.html debian/libpam-radius-auth/usr/share/doc/libpam-radius-auth/html/index.html
install -p debian/index.html debian/libpam-radius-auth/usr/share/doc/libpam-radius-auth/html/index.debian.html
# Build architecture-independent
binary-indep: build install
# nothing to do
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs Changelog
dh_installdocs README TODO USAGE debian/README.Debian
dh_installexamples pam_radius_auth.conf debian/pam_example INSTALL
dh_installdebconf
dh_strip
dh_compress usr/share/doc/libpam-radius-auth/README\
usr/share/doc/libpam-radius-auth/README.Debian\
usr/share/doc/libpam-radius-auth/USAGE\
usr/share/doc/libpam-radius-auth/examples/INSTALL
dh_fixperms
chmod 600 debian/libpam-radius-auth/etc/pam_radius_auth.conf
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: build clean binary-arch binary install patch unpatch
|