debian.improve-installation.patch 874 B

1234567891011121314151617181920212223242526272829303132
  1. Description: Improve installation
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Forwarded: not-needed
  4. Last-Update: 2018-04-07
  5. * Make LIBDIR overridable from debian/rules
  6. * Install the .a file
  7. * Don't rebuild library in install target
  8. --- a/Makefile
  9. +++ b/Makefile
  10. @@ -62,7 +62,7 @@
  11. INSTALL ?= install
  12. PREFIX ?= /usr/local
  13. -LIBDIR = $(PREFIX)/lib
  14. +LIBDIR ?= $(PREFIX)/lib
  15. INCLUDEDIR = $(PREFIX)/include
  16. ifeq (darwin,$(PLATFORM))
  17. @@ -130,9 +130,10 @@
  18. tags: http_parser.c http_parser.h test.c
  19. ctags $^
  20. -install: library
  21. +install:
  22. $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
  23. $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  24. + $(INSTALL) -D libhttp_parser.a $(DESTDIR)$(LIBDIR)/libhttp_parser.a
  25. ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
  26. ln -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)