[pacman-dev] CVS update of pacman-lib (HACKING contrib/re-pacman scripts/re-pacman)

Aaron Griffin aaron at archlinux.org
Mon Feb 26 04:19:34 EST 2007


    Date: Monday, February 26, 2007 @ 04:19:34
  Author: aaron
    Path: /home/cvs-pacman/pacman-lib

   Added: contrib/re-pacman (1.1)
Modified: HACKING (1.1 -> 1.2)
 Removed: scripts/re-pacman (1.3)

* Added a small note to HACKING
* Moved re-pacman to contrib/ as it's probably not as useful as the other stuff
  in scripts/


-------------------+
 HACKING           |    3 +
 contrib/re-pacman |   79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 scripts/re-pacman |   79 ----------------------------------------------------
 3 files changed, 82 insertions(+), 79 deletions(-)


Index: pacman-lib/HACKING
diff -u pacman-lib/HACKING:1.1 pacman-lib/HACKING:1.2
--- pacman-lib/HACKING:1.1	Tue Feb 20 11:29:21 2007
+++ pacman-lib/HACKING	Mon Feb 26 04:19:33 2007
@@ -1,6 +1,9 @@
 Contributing to pacman
 ======================
 
+Please read 'submitting-patches' and 'translation-help' in the same directory as
+this file.
+
 Coding style
 ------------
 
Index: pacman-lib/contrib/re-pacman
diff -u /dev/null pacman-lib/contrib/re-pacman:1.1
--- /dev/null	Mon Feb 26 04:19:34 2007
+++ pacman-lib/contrib/re-pacman	Mon Feb 26 04:19:33 2007
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+#   re-pacman: regenerate a pacman package based on installed files and the
+#   pacman database entries.  Useful for reuse, or possible config file
+#   extension
+#  
+#   Copyright (c) 2006 Aaron Griffin <aaron at archlinux.org>
+#  
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+# 
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#  
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
+#   USA.
+#
+
+#TODO
+#   * Check for md5 changes in backup lines and change pkgrel
+
+pacinfo () {
+	[ $# -ne 2 ] && return 1
+	#use echo to strip spaces
+	echo $(pacman -Qi ${1} | grep "${2}" | cut -d: -f2-)
+}
+
+make_pkginfo () {
+	echo "# Generated by re-pacman 1.0.0"
+	echo "# On $(date)"
+	echo "pkgname =$(pacinfo ${1} Name)"
+	echo "pkgver =$(pacinfo ${1} Version)"
+	echo "pkgdesc =$(pacinfo ${1} Description)"
+	echo "url =$(pacinfo ${1} URL)"
+	echo "builddate =$(pacinfo ${1} 'Build Date')"
+	echo "packager =$(pacinfo ${1} Packager)"
+	echo "size =$(pacinfo ${1} Size)"
+	echo "arch =$(pacinfo ${1} Architecture)"
+	deps=$(pacinfo ${1} 'Depends On')
+	for d in ${deps}; do
+		echo "depend = ${d}"
+	done
+}
+
+if [ $# -ne 1 ]; then
+	echo "usage: re-pacman <installed package name>"
+	exit 1
+fi
+
+ver=$(pacinfo ${1} Version)
+if [ "x${ver}" = "x" ]; then
+	echo "Package '${1}' not found, aborting."
+	exit 1
+fi
+
+echo ":: Cleaning up old files"
+rm -f .PKGINFO .FILELIST "${1}-${ver}.pkg.tar.gz"
+
+echo ":: Building PKGINFO"
+make_pkginfo ${1} > .PKGINFO
+echo ":: Building FILELIST"
+pacman -Ql ${1} | cut -d' ' -f2- > .FILELIST
+
+flist=".PKGINFO .FILELIST"
+flist="${flist} $(pacman -Ql ${1} | sed 's|\w* \(.*\)|/\1|g' | grep -v '/$')"
+
+echo ":: Building final package tarball"
+echo ${flist} | tr ' ' '\n' | tar czf "${1}-${ver}.pkg.tar.gz" -T - 2>/dev/null
+
+rm -f .PKGINFO .FILELIST
+echo ":: Package '${1}-${ver}.pkg.tar.gz' is now ready for installation"
+
+# vim: set ts=2 sw=2 noet:
Index: pacman-lib/scripts/re-pacman
diff -u pacman-lib/scripts/re-pacman:1.3 pacman-lib/scripts/re-pacman:removed
--- pacman-lib/scripts/re-pacman:1.3	Wed Dec 20 20:53:41 2006
+++ pacman-lib/scripts/re-pacman	Mon Feb 26 04:19:34 2007
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-#   re-pacman: regenerate a pacman package based on installed files and the
-#   pacman database entries.  Useful for reuse, or possible config file
-#   extension
-#  
-#   Copyright (c) 2006 Aaron Griffin <aaron at archlinux.org>
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-# 
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
-#   USA.
-#
-
-#TODO
-#   * Check for md5 changes in backup lines and change pkgrel
-
-pacinfo () {
-	[ $# -ne 2 ] && return 1
-	#use echo to strip spaces
-	echo $(pacman -Qi ${1} | grep "${2}" | cut -d: -f2-)
-}
-
-make_pkginfo () {
-	echo "# Generated by re-pacman 1.0.0"
-	echo "# On $(date)"
-	echo "pkgname =$(pacinfo ${1} Name)"
-	echo "pkgver =$(pacinfo ${1} Version)"
-	echo "pkgdesc =$(pacinfo ${1} Description)"
-	echo "url =$(pacinfo ${1} URL)"
-	echo "builddate =$(pacinfo ${1} 'Build Date')"
-	echo "packager =$(pacinfo ${1} Packager)"
-	echo "size =$(pacinfo ${1} Size)"
-	echo "arch =$(pacinfo ${1} Architecture)"
-	deps=$(pacinfo ${1} 'Depends On')
-	for d in ${deps}; do
-		echo "depend = ${d}"
-	done
-}
-
-if [ $# -ne 1 ]; then
-	echo "usage: re-pacman <installed package name>"
-	exit 1
-fi
-
-ver=$(pacinfo ${1} Version)
-if [ "x${ver}" = "x" ]; then
-	echo "Package '${1}' not found, aborting."
-	exit 1
-fi
-
-echo ":: Cleaning up old files"
-rm -f .PKGINFO .FILELIST "${1}-${ver}.pkg.tar.gz"
-
-echo ":: Building PKGINFO"
-make_pkginfo ${1} > .PKGINFO
-echo ":: Building FILELIST"
-pacman -Ql ${1} | cut -d' ' -f2- > .FILELIST
-
-flist=".PKGINFO .FILELIST"
-flist="${flist} $(pacman -Ql ${1} | sed 's|\w* \(.*\)|/\1|g' | grep -v '/$')"
-
-echo ":: Building final package tarball"
-echo ${flist} | tr ' ' '\n' | tar czf "${1}-${ver}.pkg.tar.gz" -T - 2>/dev/null
-
-rm -f .PKGINFO .FILELIST
-echo ":: Package '${1}-${ver}.pkg.tar.gz' is now ready for installation"
-
-# vim: set ts=2 sw=2 noet:




More information about the pacman-dev mailing list