[liblinear] 117/123: patches: Extend 0001-Properly-build-shared-and-static-libraries-programs

Christian Kastner chrisk-guest at moszumanska.debian.org
Tue Aug 26 03:42:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to branch master
in repository liblinear.

commit aaf640fbae74fe40f3cba2d8f7b1f4c294dcb10f
Author: Christian Kastner <debian at kvr.at>
Date:   Sat Jul 26 22:20:21 2014 +0200

    patches: Extend 0001-Properly-build-shared-and-static-libraries-programs
    
    Add an install target, honoring DESTDIR and allowing override of target
    directories for binaries and libraries.
---
 ...uild-shared-and-static-libraries-programs.patch | 30 ++++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
index 321d273..4fae3cd 100644
--- a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
+++ b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
@@ -3,19 +3,20 @@ Date: Fri, 9 Jul 2010 18:09:09 +0200
 Subject: Properly build shared and static libraries, programs
 
 Modify upstream's Makefile to properly build shared and static libraries,
-link upstream's programs to the shared libraries.
+and link upstream's programs to the shared libraries. Furthermore, provide
+and install target.
 
 Forwarded: not-needed
-Last-Update: 2011-04-11
+Last-Update: 2014-07-26
 ---
- Makefile | 46 ++++++++++++++++++++++++++++++----------------
- 1 file changed, 30 insertions(+), 16 deletions(-)
+ Makefile | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 43 insertions(+), 16 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 503a760..a06bde4 100644
+index 503a760..929d2e6 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1,27 +1,41 @@
+@@ -1,27 +1,54 @@
  CXX ?= g++
  CC ?= gcc
 -CFLAGS = -Wall -Wconversion -O3 -fPIC
@@ -44,16 +45,21 @@ index 503a760..a06bde4 100644
  
 -predict: tron.o linear.o predict.c
 -	$(CXX) $(CFLAGS) -o predict predict.c tron.o linear.o $(LIBS)
++bindir ?= /usr/bin/
++libdir ?= /usr/lib/
++bindest = $(DESTDIR)$(bindir)
++libdest = $(DESTDIR)$(libdir)
  
 -tron.o: tron.cpp tron.h
 -	$(CXX) $(CFLAGS) -c -o tron.o tron.cpp
-+all: liblinear-train liblinear-predict liblinear.a
  
 -linear.o: linear.cpp linear.h
 -	$(CXX) $(CFLAGS) -c -o linear.o linear.cpp
++all: liblinear-train liblinear-predict liblinear.a
+ 
 +liblinear-train: train.c $(LIBFILE)
 +	$(CXX) $(CPPFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) -o $@ train.c $(PROG_LIBS)
- 
++
 +liblinear-predict: predict.c $(LIBFILE)
 +	$(CXX) $(CPPFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) -o $@ predict.c $(PROG_LIBS)
 +
@@ -68,6 +74,14 @@ index 503a760..a06bde4 100644
 +	$(CXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o linear-static.o linear.cpp
 +	$(CXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o tron-static.o tron.cpp
 +	ar cru liblinear.a linear-static.o tron-static.o
++
++install: all
++	install -d $(bindest) $(libdest)
++	install liblinear-train liblinear-predict -m 755 $(bindest)
++	install liblinear.a -m 644 $(libdest)
++	install $(LIBFILE) -m 644 $(libdest)
++	cd $(libdest) && ln -s $(LIBFILE) liblinear.so.$(LVER)
++	cd $(libdest) && ln -s liblinear.so.$(LVER) liblinear.so
  
  clean:
 -	cd matlab;	make clean

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblinear.git



More information about the debian-science-commits mailing list