pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sds: Add rule "install" to Makefile



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Wed Jul 14 17:22:25 2021 +0200
Changeset:	f34894dfe99bccdd6cb16e4546fcb49c1406e709

Modified Files:
	sds/Makefile
	sds/distinfo
	sds/patches/patch-Makefile

Log Message:
sds: Add rule "install" to Makefile

Declare Makefile as POSIX conformant.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f34894dfe99bccdd6cb16e4546fcb49c1406e709

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 sds/Makefile               | 11 +----------
 sds/distinfo               |  2 +-
 sds/patches/patch-Makefile | 31 +++++++++++++++++++++----------
 3 files changed, 23 insertions(+), 21 deletions(-)

diffs:
diff --git a/sds/Makefile b/sds/Makefile
index 9d9dd79ba0..fc29f1cf35 100644
--- a/sds/Makefile
+++ b/sds/Makefile
@@ -13,16 +13,7 @@ LICENSE=	2-clause-bsd
 USE_LANGUAGES=	c99
 USE_LIBTOOL=	yes
 
-INSTALLATION_DIRS=	include lib share/doc/sds
-TEST_TARGET=		test
-
-do-install:
-	cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_LIB} libsds.la \
-		${DESTDIR}${PREFIX}/lib
-	cd ${WRKSRC} && ${INSTALL_DATA} sds.h \
-		${DESTDIR}${PREFIX}/include/sds.h
-	cd ${WRKSRC} && ${INSTALL_DATA} README.md \
-		${DESTDIR}${PREFIX}/share/doc/sds/README.md
+TEST_TARGET=	test
 
 .include "../../wip/mk/git-package.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/sds/distinfo b/sds/distinfo
index 9f68ddda45..ece8b6b347 100644
--- a/sds/distinfo
+++ b/sds/distinfo
@@ -1,3 +1,3 @@
 $NetBSD$
 
-SHA1 (patch-Makefile) = 81b9648c01416699cd23fdfa5d21835386c102d0
+SHA1 (patch-Makefile) = f30554e1470b83aaca1cd42898237a5b28e5bd50
diff --git a/sds/patches/patch-Makefile b/sds/patches/patch-Makefile
index 15597e241c..c8c1848ce4 100644
--- a/sds/patches/patch-Makefile
+++ b/sds/patches/patch-Makefile
@@ -1,33 +1,43 @@
 $NetBSD$
 
-* Add targets for object file, shared object and test.
+* Add targets for object file, library, test and install.
 * Honor CPPFLAGS, CFLAGS and LDFLAGS
 
 --- Makefile.orig	2021-07-14 10:28:45.000000000 +0000
 +++ Makefile
-@@ -1,8 +1,29 @@
+@@ -1,8 +1,40 @@
 -all: sds-test
-+# ABI version for shared library
-+MAJOR=  2
-+MINOR=  0
-+PATCH=  0
++.POSIX:
  
 -sds-test: sds.c sds.h testhelp.h
 -	$(CC) -o sds-test sds.c -Wall -std=c99 -pedantic -O2 -DSDS_TEST_MAIN
 -	@echo ">>> Type ./sds-test to run the sds.c unit tests."
++# ABI version for shared library
++MAJOR=  2
++MINOR=  0
++PATCH=  0
++
 +all: libsds.la
 +
 +test: sds-test
 +	./sds-test
++
++install: libsds.la
++	@set +u ; test "x$$PREFIX" != "x" || \
++            ! echo "Error: PREFIX not defined in environment"
++	install -d -m 755 "${DESTDIR}${PREFIX}/lib"
++	libtool --mode=install \
++            install -m 755 libsds.la "${DESTDIR}${PREFIX}/lib"
++	install -d -m 755 "${DESTDIR}${PREFIX}/include"
++	install -m 644 sds.h "${DESTDIR}${PREFIX}/include"
++	install -d -m 755 "${DESTDIR}${PREFIX}/share/doc/sds"
++	install -m 644 README.md "${DESTDIR}${PREFIX}/share/doc/sds"
  
  clean:
 -	rm -f sds-test
 +	rm -f sds-test sds.o sds.lo libsds.la
 +	rm -rf ./.libs
 +
-+install:
-+	
-+
 +sds.lo: sds.c sds.h
 +	libtool --tag=CC --mode=compile \
 +            $(CC) $(CPPFLAGS) $(CFLAGS) -c -Wall -std=c99 -pedantic -O2 sds.c
@@ -39,4 +49,5 @@ $NetBSD$
 +            -rpath ${PREFIX}/lib
 +
 +sds-test: sds.c sds.h testhelp.h
-+	$(CC) $(CPPFLAGS) $(CFLAGS) -o sds-test sds.c -Wall -std=c99 -pedantic -O2 -DSDS_TEST_MAIN
++	$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -std=c99 -pedantic -O2 \
++            -DSDS_TEST_MAIN -o sds-test sds.c


Home | Main Index | Thread Index | Old Index