1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Support staging

- Strip binary
This commit is contained in:
Emanuel Haupt 2014-04-17 13:37:39 +00:00
parent c853fbecde
commit 24a0a79c61
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=351474
2 changed files with 33 additions and 5 deletions

View File

@ -12,15 +12,20 @@ COMMENT= NAT-PMP lightweight library
LICENSE= BSD
USES= gmake
MAKE_ENV+= INSTALLPREFIX=${PREFIX}
CFLAGS+= -fPIC
USE_LDCONFIG= yes
MAKE_ENV+= INSTALLPREFIX=${PREFIX}
CFLAGS+= -fPIC
PLIST_FILES= bin/natpmpc \
include/natpmp.h \
lib/libnatpmp.a \
lib/libnatpmp.so \
lib/libnatpmp.so.1
NO_STAGE= yes
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/natpmpc \
${STAGEDIR}${PREFIX}/lib/libnatpmp.so.1
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- Makefile.orig 2013-09-20 03:13:32.533531973 +0800
+++ Makefile 2013-09-20 03:13:40.954532152 +0800
--- ./Makefile.orig 2012-08-21 19:24:15.000000000 +0200
+++ ./Makefile 2014-04-17 15:33:06.454854016 +0200
@@ -5,7 +5,7 @@
# http://miniupnp.free.fr/libnatpmp.html
@ -9,3 +9,26 @@
INSTALL = install
# APIVERSION is used in soname
@@ -61,14 +61,14 @@
makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
install: $(HEADERS) $(STATICLIB) $(SHAREDLIB) natpmpc-shared
- $(INSTALL) -d $(INSTALLDIRINC)
- $(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
- $(INSTALL) -d $(INSTALLDIRLIB)
- $(INSTALL) -m 644 $(STATICLIB) $(INSTALLDIRLIB)
- $(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
- $(INSTALL) -d $(INSTALLDIRBIN)
- $(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
- ln -s -f $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIB)
+ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC)
+ $(INSTALL) -m 644 $(HEADERS) $(DESTDIR)$(INSTALLDIRINC)
+ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRLIB)
+ $(INSTALL) -m 644 $(STATICLIB) $(DESTDIR)$(INSTALLDIRLIB)
+ $(INSTALL) -m 644 $(SHAREDLIB) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
+ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
+ $(INSTALL) -m 755 natpmpc-shared $(DESTDIR)$(INSTALLDIRBIN)/natpmpc
+ ln -s -f $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIB)
cleaninstall:
$(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))