Browse Source

Improve installation

* Drop dh-exec usage
* Adjust upstream's Makefile for better integration into Debian's
  buildsystem.
Christoph Biedl 6 years ago
parent
commit
31063d4b4a

+ 0 - 1
debian/control

@@ -5,7 +5,6 @@ Standards-Version: 4.1.1
 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/http-parser.git
 Vcs-Git: https://anonscm.debian.org/git/collab-maint/http-parser.git
 Build-Depends: debhelper (>= 10~),
-    dh-exec,
 Priority: optional
 Section: libs
 

+ 3 - 3
debian/libhttp-parser-dev.install

@@ -1,4 +1,4 @@
-#!/usr/bin/dh-exec
 
-http_parser.h       usr/include/
-libhttp_parser.a    usr/lib/${DEB_HOST_MULTIARCH}/
+usr/include/http_parser.h
+usr/lib/*/*.a
+usr/lib/*/*.so

+ 0 - 4
debian/libhttp-parser-dev.links

@@ -1,4 +0,0 @@
-#!/usr/bin/dh-exec
-
-usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2       usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so
-usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2.8   usr/lib/${DEB_HOST_MULTIARCH}/libhttp_parser.so.2

+ 1 - 2
debian/libhttp-parser2.8.install

@@ -1,3 +1,2 @@
-#!/usr/bin/dh-exec
 
-libhttp_parser.so.2.8 usr/lib/${DEB_HOST_MULTIARCH}/
+usr/lib/*/*.so.*

+ 32 - 0
debian/patches/improve-installation.patch

@@ -0,0 +1,32 @@
+Description: Improve installation
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Forwarded: not-needed
+Last-Update: 2018-04-07
+
+    * Make LIBDIR overridable from debian/rules
+    * Install the .a file
+    * Don't rebuild library in install target
+
+--- a/Makefile
++++ b/Makefile
+@@ -62,7 +62,7 @@
+ 
+ INSTALL ?= install
+ PREFIX ?= /usr/local
+-LIBDIR = $(PREFIX)/lib
++LIBDIR ?= $(PREFIX)/lib
+ INCLUDEDIR = $(PREFIX)/include
+ 
+ ifeq (darwin,$(PLATFORM))
+@@ -130,9 +130,10 @@
+ tags: http_parser.c http_parser.h test.c
+ 	ctags $^
+ 
+-install: library
++install:
+ 	$(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+ 	$(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++	$(INSTALL) -D libhttp_parser.a $(DESTDIR)$(LIBDIR)/libhttp_parser.a
+ 	ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+ 	ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
+ 

+ 1 - 0
debian/patches/series

@@ -0,0 +1 @@
+improve-installation.patch

+ 4 - 3
debian/rules

@@ -4,12 +4,13 @@ export DEB_BUILD_MAINT_OPTIONS := hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+export PREFIX = /usr
+export LIBDIR = $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
+
 %:
 	dh $@
 
 override_dh_auto_build:
 	dh_auto_build -- package
 	dh_auto_build -- library
-
-override_dh_makeshlibs:
-	dh_makeshlibs -V 'libhttp-parser2.8 (>= 2.8)'