mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
75a4a592e5
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
62 lines
2 KiB
Diff
62 lines
2 KiB
Diff
From 9399788e2b36fc5e345d679f650f8387376987af Mon Sep 17 00:00:00 2001
|
|
From: Igor Murzov <igor@gplsoft.org>
|
|
Date: Thu, 5 Aug 2010 02:09:56 +0400
|
|
Subject: [PATCH 07/09] Add support for .txz packages and rpm2txz symlink
|
|
|
|
---
|
|
rpm2targz | 20 +++++++++++++++-----
|
|
rpm2tgz.SlackBuild | 1 +
|
|
2 files changed, 16 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/rpm2targz b/rpm2targz
|
|
index cc25407..45ac1d7 100644
|
|
--- a/rpm2targz
|
|
+++ b/rpm2targz
|
|
@@ -23,6 +23,7 @@
|
|
#
|
|
|
|
CWD=$(pwd)
|
|
+NAME="$(basename $0)"
|
|
|
|
# Breaking the help out into it's own deal
|
|
usage() {
|
|
@@ -31,9 +32,13 @@ usage() {
|
|
echo " with \"installpkg\", \"removepkg\", \"pkgtool\", or manually"
|
|
echo " with \"tar\")"
|
|
echo
|
|
- if [ "$(basename $0)" = "rpm2tgz" ]; then
|
|
+ if [ "$NAME" = "rpm2tgz" -o "$NAME" = "rpm2txz" ]; then
|
|
echo "Usage: $0 [OPTION] <file.rpm>"
|
|
- echo " (Outputs \"file.tgz\")"
|
|
+ if [ "$NAME" = "rpm2tgz" ]; then
|
|
+ echo " (Outputs \"file.tgz\")"
|
|
+ else
|
|
+ echo " (Outputs \"file.txz\")"
|
|
+ fi
|
|
echo
|
|
echo " -s extract the install scripts to /usr/doc/\$PRGNAM-\$VERSION/"
|
|
echo " for review."
|
|
@@ -210,15 +215,20 @@ for i in $* ; do
|
|
# If this program was called as "rpm2targz", then repack as a plain
|
|
# tar+gz archive. If it was called as "rpm2tgz", use Slackware's
|
|
# makepkg to produce the .tgz:
|
|
- if [ "$(basename $0)" = "rpm2tgz" ]; then
|
|
+ if [ "$NAME" = "rpm2tgz" -o "$NAME" = "rpm2txz" ]; then
|
|
+ if [ "$NAME" = "rpm2tgz" ]; then
|
|
+ EXT=tgz
|
|
+ else
|
|
+ EXT=txz
|
|
+ fi
|
|
(
|
|
if [ "$META_NAME" = "true" ]; then
|
|
get_meta_data $i
|
|
cd $TMPDIR
|
|
- /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.tgz
|
|
+ /sbin/makepkg -l y -c n $CWD/$PRGNAM-$VERSION-$ARCH-${BUILD}.$EXT
|
|
else
|
|
cd $TMPDIR
|
|
- /sbin/makepkg -l y -c n $CWD/$(basename $i .rpm).tgz
|
|
+ /sbin/makepkg -l y -c n $CWD/$(basename $i .rpm).$EXT
|
|
fi
|
|
)
|
|
else
|