build scripts for ubuntu NetworkManager packages
This commit is contained in:
Executable
+59
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
package = strongswan-nm
|
||||
docdir = debian/tmp/usr/share/doc/$(package)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing -g
|
||||
INSTALL_PROGRAM = install
|
||||
|
||||
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
||||
build:
|
||||
$(checkdir)
|
||||
./configure --disable-aes --disable-des --disable-md5 --disable-sha1 \
|
||||
--disable-sha2 --disable-fips-prf --disable-gmp --disable-stroke \
|
||||
--disable-pluto --disable-tools --disable-updown --enable-openssl \
|
||||
--enable-nm --enable-eap-gtc \
|
||||
--sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
|
||||
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
|
||||
touch build
|
||||
|
||||
clean:
|
||||
$(checkdir)
|
||||
rm -f build
|
||||
[ ! -f Makefile ] || $(MAKE) clean
|
||||
rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
|
||||
|
||||
binary-indep: checkroot build
|
||||
$(checkdir)
|
||||
|
||||
binary-arch: checkroot build
|
||||
rm -rf debian/tmp
|
||||
install -d debian/tmp/DEBIAN $(docdir)
|
||||
$(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
||||
DESTDIR=$$(pwd)/debian/tmp install
|
||||
cp -a NEWS debian/copyright $(docdir)
|
||||
cp -a debian/changelog $(docdir)/changelog.Debian
|
||||
cd $(docdir) && gzip -9 changelog.Debian
|
||||
dpkg-gencontrol -isp
|
||||
chown -R root:root debian/tmp
|
||||
dpkg --build debian/tmp ..
|
||||
|
||||
define checkdir
|
||||
test -f src/charon/daemon.c -a -f debian/rules
|
||||
endef
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
checkroot:
|
||||
$(checkdir)
|
||||
test $$(id -u) = 0
|
||||
|
||||
.PHONY: binary binary-arch binary-indep clean checkroot
|
||||
|
||||
Reference in New Issue
Block a user