changeset 525:2527a3c1d750

Add 'dist-cygwin' and 'dist-src' targets.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sat, 27 Oct 2012 01:03:37 +0300
parents 5183a16c5e0d
children 74d60f61a8aa bcab3ed4125f
files printarg/Makefile printarg/printarg.cygport
diffstat 2 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/printarg/Makefile	Tue Oct 23 23:51:52 2012 +0300
+++ b/printarg/Makefile	Sat Oct 27 01:03:37 2012 +0300
@@ -92,6 +92,19 @@
 		[ -e $$file ] && if rm $$file; then :; else echo Unable to delete $$file; exit 1; fi || :; \
 	done
 
+.PHONY: dist-src
+dist-src:
+	mkdir ${B}printarg
+	cp $(patsubst %,${S}%,Makefile printarg.1 printarg.c printarg.cygport) ${B}printarg
+	tar zcf ${B}printarg.tar.gz -C ${B} printarg
+	rm -r ${B}printarg
+
+.PHONY: dist-cygwin
+dist-cygwin: dist-src
+	cp printarg.cygport printarg-1.0-1.cygport
+	cygport printarg-1.0-1.cygport prep compile test install package finish
+	rm printarg-1.0-1.cygport
+
 .PHONY: distclean
 distclean: clean
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/printarg/printarg.cygport	Sat Oct 27 01:03:37 2012 +0300
@@ -0,0 +1,27 @@
+CATEGORY="Utils"
+SUMMARY="Print its args."
+DESCRIPTION="Print its args."
+HOMEPAGE="https://sourceforge.net/u/gavenkoa/utils/"
+
+SRC_URI="printarg.tar.gz"
+SRC_DIR="printarg"
+
+# Build dependencies only.
+DEPEND="gcc4 make"
+# Runtime deps to go in setup.hint, and note the escaped newline.
+REQUIRES=""
+
+src_compile() {
+  cd ${B}
+  cygmake -f ${S}/Makefile all
+}
+
+src_test() {
+  cd ${B}
+  cygmake -f ${S}/Makefile check
+}
+
+src_install() {
+  cd ${B}
+  cygmake -f ${S}/Makefile prefix=${D}/usr install
+}