SVN: toys/rsget.pl: Makefile addgetter

sparky sparky at pld-linux.org
Tue Oct 13 20:14:19 CEST 2009


Author: sparky
Date: Tue Oct 13 20:14:19 2009
New Revision: 10782

Modified:
   toys/rsget.pl/Makefile
   toys/rsget.pl/addgetter
Log:
- copy .template when making package


Modified: toys/rsget.pl/Makefile
==============================================================================
--- toys/rsget.pl/Makefile	(original)
+++ toys/rsget.pl/Makefile	Tue Oct 13 20:14:19 2009
@@ -4,6 +4,7 @@
 VER =
 PKGDIR = rsget.pl-$(VER)
 
+PLUGIN_DIRS = Get Link Video
 DIRS = RSGet,Get,Link,Video,data
 
 all: rsget.pl
@@ -18,9 +19,10 @@
 	install rsget.pl $(PKGDIR)
 	cp Makefile README README.config $(PKGDIR)
 	cp RSGet/*.pm $(PKGDIR)/RSGet
-	cp Get/* $(PKGDIR)/Get
-	cp Link/* $(PKGDIR)/Link
-	cp Video/* $(PKGDIR)/Video
+	for DIR in $(PLUGIN_DIRS); do \
+		cp $$DIR/* $(PKGDIR)/$$DIR || exit 1; \
+		cp $$DIR/.template $(PKGDIR)/$$DIR || exit 1; \
+	done
 	cp data/* $(PKGDIR)/data
 	tar -cjf $(PKGDIR).tar.bz2 $(PKGDIR)
 endif
@@ -31,9 +33,9 @@
 	install rsget.pl.datadir $(DESTDIR)$(BINDIR)/rsget.pl
 	cp RSGet/*.pm $(DESTDIR)$(DATADIR)/RSGet
 	cp data/* $(DESTDIR)$(DATADIR)/data
-	cp Get/* $(DESTDIR)$(DATADIR)/Get
-	cp Link/* $(DESTDIR)$(DATADIR)/Link
-	cp Video/* $(DESTDIR)$(DATADIR)/Video
+	for DIR in $(PLUGIN_DIRS); do \
+		cp $$DIR/* $(DESTDIR)$(DATADIR)/$$DIR || exit 1; \
+	done
 	grep -l "status:\s*BROKEN" $(DESTDIR)$(DATADIR)/{Get,Link,Video}/* | xargs -r rm -v
 
 .PHONY: clean

Modified: toys/rsget.pl/addgetter
==============================================================================
--- toys/rsget.pl/addgetter	(original)
+++ toys/rsget.pl/addgetter	Tue Oct 13 20:14:19 2009
@@ -2,7 +2,7 @@
 
 my $fname = shift @ARGV;
 die "$fname exists" if -r $fname;
-$fname =~ m{^(Get|Video|Link)/([A-Z][a-zA-Z0-9_]*)$} or die "invalid";
+$fname =~ m{^(Get|Video|Link)/([A-Z0-9][a-zA-Z0-9_]*)$} or die "invalid";
 my ( $dir, $name ) = ($1, $2);
 
 open F_IN, '<', "$dir/.template" or die "no template";


More information about the pld-cvs-commit mailing list