[64531] trunk/base/src/package1.0/portrpm.tcl
jmr at macports.org
jmr at macports.org
Sun Mar 7 23:21:01 PST 2010
Revision: 64531
http://trac.macports.org/changeset/64531
Author: jmr at macports.org
Date: 2010-03-07 23:20:58 -0800 (Sun, 07 Mar 2010)
Log Message:
-----------
use supported_archs and license in portrpm
Modified Paths:
--------------
trunk/base/src/package1.0/portrpm.tcl
Modified: trunk/base/src/package1.0/portrpm.tcl
===================================================================
--- trunk/base/src/package1.0/portrpm.tcl 2010-03-08 06:31:48 UTC (rev 64530)
+++ trunk/base/src/package1.0/portrpm.tcl 2010-03-08 07:20:58 UTC (rev 64531)
@@ -55,7 +55,7 @@
proc portrpm::rpm_pkg {portname portversion portrevision} {
global UI_PREFIX package.destpath portdbpath destpath workpath prefix categories maintainers description long_description homepage epoch portpath
- global os.platform os.arch os.version os.major
+ global os.platform os.arch os.version os.major supported_archs configure.build_arch license
set rpmdestpath ""
if {![string equal ${package.destpath} ${workpath}] && ![string equal ${package.destpath} ""]} {
@@ -67,17 +67,18 @@
${pkgpath}/SRPMS
set rpmdestpath "--define '_topdir ${pkgpath}'"
}
-
+
set rpmbuildarch ""
- if {[variant_isset "universal"]} {
+ if {$supported_archs == "noarch"} {
+ set rpmbuildarch "--target noarch"
+ } elseif {[variant_exists universal] && [variant_isset universal]} {
set rpmbuildarch "--target fat"
+ } elseif {${configure.build_arch} != ""} {
+ set rpmbuildarch "--target ${configure.build_arch}"
}
- if {false} {
- set rpmbuildarch "--target noarch"
- }
foreach dir [list "${prefix}/src/macports/RPMS" "${prefix}/src/apple/RPMS" "/usr/src/apple/RPMS" "/macports/rpms/RPMS"] {
- foreach arch {"ppc" "i386" "fat" "noarch"} {
+ foreach arch [list ${configure.build_arch} ${os.arch} "fat" "noarch"] {
set rpmpath "$dir/${arch}/${portname}-${portversion}-${portrevision}.${arch}.rpm"
if {[file readable $rpmpath] && ([file mtime ${rpmpath}] >= [file mtime ${portpath}/Portfile])} {
ui_debug "$rpmpath"
@@ -97,7 +98,6 @@
}
}
set category [lindex [split $categories " "] 0]
- set license "Unknown"
set maintainer $maintainers
set dependencies {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100307/4ec3453e/attachment.html>
More information about the macports-changes
mailing list