[26472] trunk/base/src/package1.0/portrpmpackage.tcl

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 25 04:01:16 PDT 2007


Revision: 26472
          http://trac.macosforge.org/projects/macports/changeset/26472
Author:   afb at macports.org
Date:     2007-06-25 04:01:16 -0700 (Mon, 25 Jun 2007)

Log Message:
-----------
pass .spec info as params, including homepage/URL

Modified Paths:
--------------
    trunk/base/src/package1.0/portrpmpackage.tcl

Modified: trunk/base/src/package1.0/portrpmpackage.tcl
===================================================================
--- trunk/base/src/package1.0/portrpmpackage.tcl	2007-06-25 10:14:14 UTC (rev 26471)
+++ trunk/base/src/package1.0/portrpmpackage.tcl	2007-06-25 11:01:16 UTC (rev 26472)
@@ -91,6 +91,7 @@
         }
     }
     set category   [lindex [split $categories " "] 0]
+    set license    "Unknown"
     set maintainer $maintainers
     
     set dependencies {}
@@ -111,11 +112,12 @@
 	lappend dependencies "org.macports.${os.arch}"
 	lappend dependencies "org.macports.${os.platform}${major}"
     
+    set listpath ${workpath}/${portname}.filelist
     system "rm -f '${workpath}/${portname}.filelist' && touch '${workpath}/${portname}.filelist'"
     #system "cd '${destpath}' && find . -type d | grep -v -E '^.$' | sed -e 's/\"/\\\"/g' -e 's/^./%dir \"/' -e 's/$/\"/' > '${workpath}/${portname}.filelist'"
     system "cd '${destpath}' && find . ! -type d | grep -v /etc/ | sed -e 's/\"/\\\"/g' -e 's/^./\"/' -e 's/$/\"/' >> '${workpath}/${portname}.filelist'"
     system "cd '${destpath}' && find . ! -type d | grep /etc/ | sed -e 's/\"/\\\"/g' -e 's/^./%config \"/' -e 's/$/\"/' >> '${workpath}/${portname}.filelist'"
-    write_spec ${specpath} $portname $portversion $portrevision $pkg_description $pkg_long_description $category $maintainer $destpath $dependencies $epoch
+    write_spec ${specpath} ${destpath} ${listpath} $portname $portversion $portrevision $pkg_description $pkg_long_description $pkg_homepage $category $license $maintainer $dependencies $epoch
     system "MP_USERECEIPTS='${portdbpath}/receipts' rpmbuild -bb -v ${rpmbuildarch} ${rpmdestpath} ${specpath}"
     
     return 0
@@ -155,7 +157,7 @@
     return $result
 }
 
-proc write_spec {specfile portname portversion portrevision description long_description category maintainer destroot dependencies epoch} {
+proc write_spec {specfile destroot filelist portname portversion portrevision description long_description homepage category license maintainer dependencies epoch} {
     set specfd [open ${specfile} w+]
     set origportname ${portname}
     regsub -all -- "\-" $portversion "_" portversion
@@ -175,7 +177,8 @@
 Version: ${portversion}
 Release: ${portrevision}
 Group: ${category}
-License: Unknown
+License: ${license}
+URL: ${homepage}
 BuildRoot: ${destroot}
 Epoch: ${epoch}
 AutoReqProv: no"
@@ -193,6 +196,6 @@
 %install
 %clean
 
-%files -f ${destroot}/../${origportname}.filelist"
+%files -f ${filelist}"
     close $specfd
 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070625/23e238b1/attachment.html


More information about the macports-changes mailing list