summaryrefslogtreecommitdiff
path: root/mk/mkc_imp.arch.mk
diff options
context:
space:
mode:
authorAndrew Shadura <andrew@shadura.me>2015-07-25 14:44:29 +0200
committerAndrew Shadura <andrew@shadura.me>2015-07-25 14:44:29 +0200
commitaba913436a8521abe405a04ed71388989e1d646f (patch)
tree0e2fea8c3ccf06ae3b370806810e382ca51f4a98 /mk/mkc_imp.arch.mk
parent1d3d0bb1e461a81bc1a9cd4520958bd2b1db4c7f (diff)
Imported Upstream version 0.25.0
Diffstat (limited to 'mk/mkc_imp.arch.mk')
-rw-r--r--mk/mkc_imp.arch.mk38
1 files changed, 38 insertions, 0 deletions
diff --git a/mk/mkc_imp.arch.mk b/mk/mkc_imp.arch.mk
new file mode 100644
index 0000000..fda3999
--- /dev/null
+++ b/mk/mkc_imp.arch.mk
@@ -0,0 +1,38 @@
+# Copyright (c) 2010 by Aleksey Cheusov
+#
+# See LICENSE file in the distribution.
+############################################################
+
+.ifndef _MKC_IMP_ARCH_MK
+_MKC_IMP_ARCH_MK := 1
+
+rnd != echo $$$$
+destdir = ${TMPDIR:U/tmp}/mkc.${rnd}
+basefile = ${.CURDIR}/${PROJECTNAME}
+
+.PHONY: bin_cleanup bin_tar bin_targz bin_tarbz2
+
+bin_cleanup:
+ set -e; ${RM} -rf ${destdir}; ${MKDIR} -m 0700 ${destdir}; \
+ ${MAKE} ${MAKEFLAGS} all install DESTDIR=${destdir}
+
+bin_tar: bin_cleanup
+ set -e; ${RM} -f ${basefile}.tar; cd ${destdir}; \
+ ${TAR} -cf ${basefile}.tar .; cd /; ${RM} -rf ${destdir}
+
+bin_targz: bin_tar
+ ${GZIP} ${basefile}.tar
+
+bin_tarbz2: bin_tar
+ ${BZIP2} ${basefile}.tar
+
+bin_zip: bin_cleanup
+ set -e; ${RM} -f ${basefile}.zip; cd ${destdir}; \
+ ${ZIP} -r ${basefile}.zip .; ${RM} -rf ${destdir}
+
+bin_deb: DEBIAN/control bin_cleanup
+ set -e; cp -rp DEBIAN ${destdir}; ${RM} -rf ${destdir}/DEBIAN/CVS; \
+ dpkg-deb -b ${destdir} ${.CURDIR:T:S/_/-/g}.deb; \
+ ${RM} -rf ${destdir}
+
+.endif # _MKC_IMP_ARCH_MK