rules 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/usr/bin/make -f
  2. #export DH_VERBOSE=1
  3. CC = gcc
  4. CFLAGS = -Wall -Wno-format -Wno-pointer-sign -g
  5. CONFIGURE_ARGS = \
  6. --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc --enable-curl \
  7. --enable-ldap --disable-aes --disable-des --disable-md5 --disable-sha1 \
  8. --disable-sha2 --disable-fips-prf --disable-gmp --disable-pgp --disable-dnskey \
  9. --enable-mysql --enable-sqlite --enable-eap-identity --enable-eap-md5 \
  10. --enable-eap-mschapv2 --enable-eap-tls --enable-eap-radius --enable-xauth-eap \
  11. --enable-farp --enable-attr-sql --enable-dhcp --enable-openssl --enable-agent \
  12. --enable-pkcs11 --enable-ctr --enable-ccm --enable-gcm --enable-addrblock \
  13. --enable-nm --disable-hmac --with-capabilities=libcap \
  14. --with-ipsecdir=/usr/lib/strongswan --with-ipseclibdir=/usr/lib/strongswan \
  15. --with-dev-headers=/usr/include/strongswan
  16. ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
  17. CFLAGS += -O2
  18. endif
  19. ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  20. NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  21. MAKEFLAGS += -j$(NUMJOBS)
  22. endif
  23. ifeq ($(DEB_BUILD_ARCH_CPU),i386)
  24. CONFIGURE_ARGS += --enable-padlock
  25. endif
  26. build:
  27. dh_testdir
  28. ./configure $(CONFIGURE_ARGS) CC="$(CC)" CFLAGS="$(CFLAGS)"
  29. $(MAKE)
  30. touch build
  31. clean:
  32. dh_testdir
  33. dh_testroot
  34. rm -f build
  35. [ ! -f Makefile ] || $(MAKE) clean
  36. dh_clean
  37. install: build
  38. dh_testdir
  39. dh_testroot
  40. dh_clean
  41. dh_installdirs
  42. $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
  43. binary-indep: build install
  44. binary-arch: build install
  45. dh_testdir
  46. dh_testroot
  47. dh_installchangelogs NEWS
  48. dh_installdocs README
  49. dh_installinit --name=ipsec
  50. dh_install -s
  51. dh_link
  52. dh_strip --dbg=strongswan-dbg
  53. dh_compress
  54. dh_fixperms -Xetc/ipsec.secrets -Xetc/ipsec.d
  55. dh_makeshlibs
  56. dh_installdeb
  57. dh_shlibdeps
  58. dh_gencontrol -s
  59. dh_md5sums
  60. dh_builddeb -s
  61. binary: binary-indep binary-arch
  62. .PHONY: build clean binary-indep binary-arch binary install