ppcrcd/trunk/Makefile
sparky
cvs at pld-linux.org
Thu Feb 9 04:30:13 CET 2006
Author: sparky
Date: Thu Feb 9 04:30:10 2006
New Revision: 6957
Modified:
ppcrcd/trunk/Makefile
Log:
- added cleanSOURCES rule, slow but works
Modified: ppcrcd/trunk/Makefile
==============================================================================
--- ppcrcd/trunk/Makefile (original)
+++ ppcrcd/trunk/Makefile Thu Feb 9 04:30:10 2006
@@ -212,7 +212,7 @@
out/rpm/rpms/%:
@#XXX every package neads something like: $(R)/setup: $(P)/setup
- @[ -n "$^" ]
+ @[ -n "$^" ] || $(error $@: prerequisite needed)
#######################################################################
### Building $(notdir $(firstword $^))
#######################################################################
@@ -316,6 +316,19 @@
done; \
cd out/rpm/RPMS/ && du -shc $$LIST && rm -v $$LIST
+cleanSOURCES:
+ LIST=$$(ls out/rpm/SOURCES/ | egrep '(gz|bz2|zip)$$' | xargs ); \
+ for FILE in $$(ls out/rpm/sources); do \
+ LIST2=$$(rpmbuild --define "prep %dump" \
+ out/rpm/SPECS/$$FILE.spec 2>&1 \
+ | awk '/SOURCEURL|PATCHURL/ {print $$3}' \
+ | sed 's at .*/@@'); \
+ for F in $$LIST2; do \
+ LIST=$$(echo " $$LIST " | sed "s/ $$F / /"); \
+ done \
+ done; \
+ cd out/rpm/SOURCES/ && du -shc $$LIST && rm -v $$LIST
+
# don't delete anything
.SECONDARY:
More information about the pld-cvs-commit
mailing list