aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-08-23 00:01:08 -0400
committerMike Frysinger <vapier@gentoo.org>2010-08-23 00:01:08 -0400
commit4dc68a994ebcec662b3bcf8870ba733821abd894 (patch)
treec3a1a7716cc2720177e451085b2833b4d8f2bca5
parentrpm2targz: avoid double deletion of workdir (diff)
downloadrpm2targz-4dc68a994ebcec662b3bcf8870ba733821abd894.tar.gz
rpm2targz-4dc68a994ebcec662b3bcf8870ba733821abd894.tar.bz2
rpm2targz-4dc68a994ebcec662b3bcf8870ba733821abd894.zip
improve local symlink management
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--.gitignore11
-rw-r--r--Makefile10
2 files changed, 16 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index d46a3fe..f0b906a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,14 @@ core
*.orig
*.rej
-rpm2tar
-rpmoffset
+/rpm2tar
+/rpm2tarbz2
+/rpm2tarlzma
+/rpm2tarxz
+/rpm2tbz2
+/rpm2tgz
+/rpm2txz
+/rpmoffset
+/rpmunpack
/test
diff --git a/Makefile b/Makefile
index fc789d0..ae4c023 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ rpm2tar: rpm2targz
$(dosym) $< $@
clean:
- rm -f *.o rpmoffset rpm2tar
+ rm -f *.o rpmoffset rpm2tar $(LINKS)
dist:
git archive --prefix=$(P)/ master | lzma > $(P).tar.lzma
@@ -26,12 +26,16 @@ dist-live: clean
mkdir $(P)
cp `find . -maxdepth 1 -type f '!' -name .gitignore` $(P)
+LINKS = $(patsubst %,rpm2%,tar tarbz2 tbz2 tarlzma tgz tarxz txz)
+links:
+ set -e; for t in $(LINKS) ; do $(dosym) rpm2targz $$t ; done
+
install: rpmoffset
$(dodir) $(DESTDIR)$(bindir)
$(dobin) rpm2targz rpmoffset $(DESTDIR)$(bindir)
set -e ; \
- for t in tar tarbz2 tbz2 tarlzma tgz tarxz txz ; do \
- $(dosym) rpm2targz $(DESTDIR)$(bindir)/rpm2$$t ; \
+ for t in $(LINKS) ; do \
+ $(dosym) rpm2targz $(DESTDIR)$(bindir)/$$t ; \
done
$(dosym) rpm2targz $(DESTDIR)$(bindir)/rpmunpack