Improved build: hardening, DESTDIR convention
authorkaliko <kaliko@azylum.org>
Sat, 2 May 2015 07:24:57 +0000 (09:24 +0200)
committerkaliko <kaliko@azylum.org>
Sat, 2 May 2015 07:24:57 +0000 (09:24 +0200)
Makefile
debian/dirs
debian/patches/make.pt
debian/rules

index da2c8f1..716be90 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -84,4 +84,4 @@ clean:
        rm -rf opentracker opentracker.debug *.o *~
 
 install:
-       install -m 755 opentracker $(BINDIR)
+       install -m 755 opentracker $(DESTDIR)/$(BINDIR)
index 9c1050e..74b6867 100644 (file)
@@ -1,3 +1,3 @@
-bin
+usr/bin
 etc/opentracker
 var/lib/opentracker
index 185329d..1fffbb9 100644 (file)
@@ -4,12 +4,9 @@ Author: kaliko <kaliko@azylum.org>
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/Makefile
 +++ b/Makefile
-@@ -17,7 +17,7 @@
- LIBOWFAT_HEADERS=$(PREFIX)/libowfat
- LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
--BINDIR?=$(PREFIX)/bin
-+BINDIR=$(DESTDIR)/bin
- #FEATURES+=-DWANT_V6
+@@ -84,4 +84,4 @@
+       rm -rf opentracker opentracker.debug *.o *~
  
+ install:
+-      install -m 755 opentracker $(BINDIR)
++      install -m 755 opentracker $(DESTDIR)/$(BINDIR)
index 92a2f01..1fd80b9 100755 (executable)
@@ -1,20 +1,20 @@
 #!/usr/bin/make -f
 # See debhelper(7) (uncomment to enable)
 # output every command that modifies files on the build system.
-DH_VERBOSE = 1
+#DH_VERBOSE = 1
 
 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
 # see FEATURE AREAS in dpkg-buildflags(1)
-#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 # see ENVIRONMENT in dpkg-buildflags(1)
 # package maintainers to append CFLAGS
-#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 # package maintainers to append LDFLAGS
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 #FEATURES+=-DWANT_V6
 #FEATURES+=-DWANT_ACCESSLIST_BLACK
@@ -32,6 +32,7 @@ export FEATURES
 export LIBOWFAT_HEADERS=/usr/include
 export LIBOWFAT_LIBRARY=/usr/lib
 export LDFLAGS+=-lfreebsd-glue
+export PREFIX=/usr
 
 # main packaging script based on dh7 syntax
 %: