tAdd a CLEANUP variable to remove files before packing - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 6c0c3494f901effef64609c3a679d91818e5ce6d
(DIR) parent 837e5de1391647d28970eb9c385b4e4a084f3f54
(HTM) Author: Willy <willyatmailoodotorg>
Date: Fri, 10 Jun 2016 08:51:56 +0200
Add a CLEANUP variable to remove files before packing
Diffstat:
M binutils/mkfile | 1 +
M default.mk | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/binutils/mkfile b/binutils/mkfile
t@@ -6,6 +6,7 @@ url = ftp://ftp.gnu.org/gnu/$pkg/$pkg-$ver.tar.bz2
<../default.mk
MAKEFLAGS = ${MAKEFLAGS} tooldir=''
+CLEANUP = bin/strings man/man1/strings.1
build:QV: fetch patch
cd $WORK/$pkg-$ver
(DIR) diff --git a/default.mk b/default.mk
t@@ -27,15 +27,14 @@ install:QV: build
cleanup:V: install
cd $destdir
+ test -n "$CLEANUP" && rm -r $CLEANUP
find . -name '*.la' | xargs -r rm
find . -name '*.so' | xargs -r rm
find . -name '*.so.*' | xargs -r rm
find . -name 'info' -type d | xargs -r rm -r
find . -name 'doc' -type d | xargs -r rm -r
find . -name 'pkgconfig' -type d | xargs -r rm -r
- if [ -d ./share ] && [ -z "$(ls ./share)" ]; then
- rmdir ./share
- fi
+ test -d ./share -a -z "$(ls ./share)" && rmdir ./share
# patch your software using everything in ./patches
patch:QV: fetch