[28420] trunk/dports/sysutils

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 30 14:11:35 PDT 2007


Revision: 28420
          http://trac.macosforge.org/projects/macports/changeset/28420
Author:   afb at macports.org
Date:     2007-08-30 14:11:34 -0700 (Thu, 30 Aug 2007)

Log Message:
-----------
new port (by request): old-style yum/up2date headers

Added Paths:
-----------
    trunk/dports/sysutils/yum-arch/
    trunk/dports/sysutils/yum-arch/Portfile
    trunk/dports/sysutils/yum-arch/files/
    trunk/dports/sysutils/yum-arch/files/patch-prefix.diff
    trunk/dports/sysutils/yum-arch/files/yum-arch-folder.patch

Added: trunk/dports/sysutils/yum-arch/Portfile
===================================================================
--- trunk/dports/sysutils/yum-arch/Portfile	                        (rev 0)
+++ trunk/dports/sysutils/yum-arch/Portfile	2007-08-30 21:11:34 UTC (rev 28420)
@@ -0,0 +1,45 @@
+# $Id$
+
+PortSystem 1.0
+
+name		yum-arch
+version		2.2.2
+platforms	darwin
+categories	sysutils
+maintainers	afb at macports.org
+description	Extract headers from rpm in a old yum repository
+long_description	Extract headers from rpm in a old yum repository. \
+\
+This package only provides the old yum-arch command from yum-${version}. \
+It should be used to generate repository informations for Fedora Core  < 3 \
+and Red Hat Enterprise Linux < 4.
+
+homepage	http://linux.duke.edu/yum/
+master_sites	${homepage}download/2.2/
+distname		yum-${version}
+checksums	md5 734cc68e26c2fd07629616ab597acac6
+
+patchfiles	 yum-arch-folder.patch patch-prefix.diff
+
+depends_lib	port:rpm port:python24 port:py-libxml2
+
+patch {
+		foreach patch $patchfiles {
+			system "cd '${workpath}/${distname}' && \
+			sed -e 's#@@PREFIX@@#${prefix}#g' -e 's#@@PYTHON@@#${prefix}/bin/python2.4#g' '${portpath}/${filesdir}/${patch}' | patch -p0"
+		}
+}
+
+post-patch {
+		# problem with case-insensitive filesystem:
+		file delete ${workpath}/${distname}/INSTALL
+		
+		cd $worksrcpath
+		foreach source [glob *.py repomd/*.py rpmUtils/*.py yum/*.py] {
+			reinplace "/^#!\\/usr/d" ${source}
+		}
+}
+
+use_configure	no
+
+build.args	PYTHON="${prefix}/bin/python2.4"


Property changes on: trunk/dports/sysutils/yum-arch/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/sysutils/yum-arch/files/patch-prefix.diff
===================================================================
--- trunk/dports/sysutils/yum-arch/files/patch-prefix.diff	                        (rev 0)
+++ trunk/dports/sysutils/yum-arch/files/patch-prefix.diff	2007-08-30 21:11:34 UTC (rev 28420)
@@ -0,0 +1,103 @@
+--- Makefile.orig	2007-08-30 16:01:17.000000000 +0200
++++ Makefile	2007-08-30 16:03:05.000000000 +0200
+@@ -17,14 +17,14 @@
+ 	for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
+ 
+ install:
+-	mkdir -p $(DESTDIR)/usr/share/yum-arch
++	mkdir -p $(DESTDIR)@@PREFIX@@/share/yum-arch
+ 	for p in $(PYFILES) ; do \
+-		install -m 644 $$p $(DESTDIR)/usr/share/yum-arch/$$p; \
++		install -m 644 $$p $(DESTDIR)@@PREFIX@@/share/yum-arch/$$p; \
+ 	done
+-	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-arch', 1, '$(PYDIR)', 1)"
++	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)@@PREFIX@@/share/yum-arch', 1, '$(PYDIR)', 1)"
+ 
+-	mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/bin
+-	install -m 755 bin/yum-arch $(DESTDIR)/usr/bin/yum-arch
++	mkdir -p $(DESTDIR)@@PREFIX@@/bin $(DESTDIR)@@PREFIX@@/bin
++	install -m 755 bin/yum-arch $(DESTDIR)@@PREFIX@@/bin/yum-arch
+ 
+ 	mkdir -p $(DESTDIR)/var/cache/yum
+ 
+--- ./docs/Makefile.orig	2007-08-30 16:05:21.000000000 +0200
++++ ./docs/Makefile	2007-08-30 16:07:46.000000000 +0200
+@@ -5,5 +5,5 @@ clean:
+ 	rm -f *.pyc *.pyo *~
+ 
+ install:
+-	mkdir -p $(DESTDIR)/usr/share/man/man8
+-	install -m 644 yum-arch.8 $(DESTDIR)/usr/share/man/man8/yum-arch.8
++	mkdir -p $(DESTDIR)@@PREFIX@@/share/man/man8
++	install -m 644 yum-arch.8 $(DESTDIR)@@PREFIX@@/share/man/man8/yum-arch.8
+--- ./i18n.py.orig	2007-08-30 16:33:16.000000000 +0200
++++ ./i18n.py	2007-08-30 16:34:44.000000000 +0200
+@@ -17,7 +17,7 @@
+         t = gettext.translation('yum')
+         _ = t.gettext
+     else:
+-        gettext.bindtextdomain('yum', '/usr/share/locale')
++        gettext.bindtextdomain('yum', '@@PREFIX@@/share/locale')
+         gettext.textdomain('yum')
+         _ = gettext.gettext
+ 
+--- ./bin/yum-arch.orig	2007-08-30 16:09:50.000000000 +0200
++++ ./bin/yum-arch	2007-08-30 16:15:04.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!@@PYTHON@@
+ # yum-arch -- Creates YUM distribution databases
+ #
+ # This program is free software; you can redistribute it and/or modify
+@@ -18,6 +18,6 @@
+ 
+ import sys
+ 
+-sys.path.insert(0,'/usr/share/yum-arch')
++sys.path.insert(0,'@@PREFIX@@/share/yum-arch')
+ import pullheaders
+ pullheaders.main(sys.argv[1:])
+--- ./repomd/Makefile.orig	2007-08-30 16:09:50.000000000 +0200
++++ ./repomd/Makefile	2007-08-30 16:15:04.000000000 +0200
+@@ -3,7 +3,7 @@ PYFILES = $(wildcard *.py)
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = /usr/share/yum-arch/$(PACKAGE)
++PKGDIR = @@PREFIX@@/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./rpmUtils/Makefile.orig	2007-08-30 16:09:50.000000000 +0200
++++ ./rpmUtils/Makefile	2007-08-30 16:15:04.000000000 +0200
+@@ -3,7 +3,7 @@ PYFILES = $(wildcard *.py)
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = /usr/share/yum-arch/$(PACKAGE)
++PKGDIR = @@PREFIX@@/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./urlgrabber/Makefile.orig	2007-08-30 16:09:50.000000000 +0200
++++ ./urlgrabber/Makefile	2007-08-30 16:15:04.000000000 +0200
+@@ -3,7 +3,7 @@ PYFILES = $(wildcard *.py)
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = /usr/share/yum-arch/$(PACKAGE)
++PKGDIR = @@PREFIX@@/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./yum/Makefile.orig	2007-08-30 16:09:50.000000000 +0200
++++ ./yum/Makefile	2007-08-30 16:15:04.000000000 +0200
+@@ -3,7 +3,7 @@ PYFILES = $(wildcard *.py)
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = /usr/share/yum-arch/$(PACKAGE)
++PKGDIR = @@PREFIX@@/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"

Added: trunk/dports/sysutils/yum-arch/files/yum-arch-folder.patch
===================================================================
--- trunk/dports/sysutils/yum-arch/files/yum-arch-folder.patch	                        (rev 0)
+++ trunk/dports/sysutils/yum-arch/files/yum-arch-folder.patch	2007-08-30 21:11:34 UTC (rev 28420)
@@ -0,0 +1,91 @@
+--- ./docs/Makefile.remi	2004-10-13 07:36:58.000000000 +0200
++++ ./docs/Makefile	2007-02-16 17:11:37.000000000 +0100
+@@ -5,7 +5,5 @@
+ 	rm -f *.pyc *.pyo *~
+ 
+ install:
+-	mkdir -p $(DESTDIR)/usr/share/man/man{5,8}
+-	install -m 644 yum.8 $(DESTDIR)/usr/share/man/man8/yum.8
++	mkdir -p $(DESTDIR)/usr/share/man/man8
+ 	install -m 644 yum-arch.8 $(DESTDIR)/usr/share/man/man8/yum-arch.8
+-	install -m 644 yum.conf.5 $(DESTDIR)/usr/share/man/man5/yum.conf.5
+--- ./yum/Makefile.remi	2004-08-31 06:20:04.000000000 +0200
++++ ./yum/Makefile	2007-02-16 17:11:37.000000000 +0100
+@@ -3,7 +3,7 @@
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
++PKGDIR = /usr/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./repomd/Makefile.remi	2004-08-31 06:20:03.000000000 +0200
++++ ./repomd/Makefile	2007-02-16 17:11:37.000000000 +0100
+@@ -3,7 +3,7 @@
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
++PKGDIR = /usr/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./bin/yum-arch.remi	2004-10-13 07:57:34.000000000 +0200
++++ ./bin/yum-arch	2007-02-16 17:11:37.000000000 +0100
+@@ -18,6 +18,6 @@
+ 
+ import sys
+ 
+-sys.path.insert(1,'/usr/share/yum-cli')
++sys.path.insert(0,'/usr/share/yum-arch')
+ import pullheaders
+ pullheaders.main(sys.argv[1:])
+--- ./Makefile.remi	2005-01-25 06:56:43.000000000 +0100
++++ ./Makefile	2007-02-16 17:13:59.000000000 +0100
+@@ -1,4 +1,4 @@
+-SUBDIRS = repomd rpmUtils urlgrabber yum etc docs
++SUBDIRS = repomd rpmUtils urlgrabber yum docs
+ PYFILES = $(wildcard *.py)
+ 
+ PKGNAME = yum
+@@ -17,14 +17,13 @@
+ 	for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
+ 
+ install:
+-	mkdir -p $(DESTDIR)/usr/share/yum-cli
++	mkdir -p $(DESTDIR)/usr/share/yum-arch
+ 	for p in $(PYFILES) ; do \
+-		install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
++		install -m 644 $$p $(DESTDIR)/usr/share/yum-arch/$$p; \
+ 	done
+-	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"
++	$(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-arch', 1, '$(PYDIR)', 1)"
+ 
+ 	mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/bin
+-	install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
+ 	install -m 755 bin/yum-arch $(DESTDIR)/usr/bin/yum-arch
+ 
+ 	mkdir -p $(DESTDIR)/var/cache/yum
+--- ./urlgrabber/Makefile.remi	2004-08-31 06:20:04.000000000 +0200
++++ ./urlgrabber/Makefile	2007-02-16 17:11:37.000000000 +0100
+@@ -3,7 +3,7 @@
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
++PKGDIR = /usr/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"
+--- ./rpmUtils/Makefile.remi	2004-08-31 06:20:03.000000000 +0200
++++ ./rpmUtils/Makefile	2007-02-16 17:11:37.000000000 +0100
+@@ -3,7 +3,7 @@
+ PYVER := $(shell python -c 'import sys; print "%.3s" %(sys.version)')
+ PYSYSDIR := $(shell python -c 'import sys; print sys.prefix')
+ PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER)
+-PKGDIR = $(PYLIBDIR)/site-packages/$(PACKAGE)
++PKGDIR = /usr/share/yum-arch/$(PACKAGE)
+ 
+ all: 
+ 	echo "Nothing to do"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070830/942890aa/attachment.html


More information about the macports-changes mailing list