source: trunk/dports/sysutils/yum/Portfile @ 91163

Last change on this file since 91163 was 91163, checked in by afb@…, 7 years ago

yum: add python27 variant, make them conflict

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1# $Id: Portfile 91163 2012-03-24 14:44:39Z afb@macports.org $
2
3PortSystem 1.0
4
5name            yum
6version         3.2.29
7set branch      [join [lrange [split ${version} .] 0 1] .]
8platforms       darwin
9categories      sysutils archivers
10maintainers     mac.com:n3npq afb
11description     Automatic updater and package installer/remover for RPM
12long_description        Yum is an automatic updater and package installer/remover for \
13                        rpm systems. It automatically computes dependencies and figures \
14                        out what things should occur to install packages. It makes it \
15                        easier to maintain groups of machines without having to manually \
16                        update each one using rpm.
17
18homepage        http://yum.baseurl.org/
19master_sites    ${homepage}download/${branch}/
20checksums       md5 8b6b106190980c606b77ebf6a81b5f70 \
21                sha1 30207763c6a6fbf2f5dc32512bd3eb208f7d39d1 \
22                rmd160 ab885fc93875925ae57ceabc8731357221d1fae3
23
24patchfiles      patch-prefix.diff patch-sqlutils.py patch-packages.py
25
26depends_lib     lib:librpm:rpm port:python24 port:py-celementtree port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser port:py-iniparse port:py-pygpgme
27depends_build   port:intltool port:py24-nose
28
29set python.bin  ${prefix}/bin/python2.4
30
31patch {
32                foreach patch $patchfiles {
33                        system "cd '${workpath}/${distname}' && \
34                        sed -e 's#@@PREFIX@@#${prefix}#g' -e 's#@@PYTHON@@#${python.bin}#g' '${portpath}/${filesdir}/${patch}' | patch -p0"
35                }
36}
37
38post-patch {
39                # problem with case-insensitive filesystem:
40                file delete ${workpath}/${distname}/INSTALL
41}
42
43use_configure   no
44
45build.args      PYTHON="${python.bin}"
46destroot.args   PYTHON="${python.bin}" PYSYSDIR="${prefix}"
47
48variant python24 conflicts python25 python26 python27 description "use python 2.4" {}
49default_variants +python24
50
51variant python25 conflicts python24 python26 python27 description "use python 2.5" {
52        depends_lib-delete      port:python24 port:py-celementtree port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser port:py-iniparse port:py-pygpgme
53        depends_lib-append      port:python25 port:py25-celementtree port:py25-urlgrabber port:py25-libxml2 port:py25-yum-metadata-parser port:py25-iniparse port:py25-pygpgme
54        depends_build-delete    port:py24-nose
55        depends_build-append    port:py25-nose
56        set python.bin          ${prefix}/bin/python2.5
57        build.args-delete       PYTHON="${prefix}/bin/python2.4"
58        build.args-append       PYTHON="${prefix}/bin/python2.5"
59        destroot.args-delete    PYTHON="${prefix}/bin/python2.4"
60        destroot.args-append    PYTHON="${prefix}/bin/python2.5"
61}
62
63variant python26 conflicts python24 python25 python27 description "use python 2.6" {
64        depends_lib-delete      port:python24 port:py-celementtree port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser port:py-iniparse port:py-pygpgme
65        depends_lib-append      port:python26 port:py26-celementtree port:py26-urlgrabber port:py26-libxml2 port:py26-yum-metadata-parser port:py26-iniparse port:py26-pygpgme
66        depends_build-delete    port:py24-nose
67        depends_build-append    port:py26-nose
68        set python.bin          ${prefix}/bin/python2.6
69        build.args-delete       PYTHON="${prefix}/bin/python2.4"
70        build.args-append       PYTHON="${prefix}/bin/python2.6"
71        destroot.args-delete    PYTHON="${prefix}/bin/python2.4"
72        destroot.args-append    PYTHON="${prefix}/bin/python2.6"
73}
74
75variant python27 conflicts python24 python25 python26 description "use python 2.7" {
76        depends_lib-delete      port:python24 port:py-celementtree port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser port:py-iniparse port:py-pygpgme
77        depends_lib-append      port:python27 port:py27-celementtree port:py27-urlgrabber port:py27-libxml2 port:py27-yum-metadata-parser port:py27-iniparse port:py27-pygpgme
78        depends_build-delete    port:py24-nose
79        depends_build-append    port:py27-nose
80        set python.bin          ${prefix}/bin/python2.7
81        build.args-delete       PYTHON="${prefix}/bin/python2.4"
82        build.args-append       PYTHON="${prefix}/bin/python2.7"
83        destroot.args-delete    PYTHON="${prefix}/bin/python2.4"
84        destroot.args-append    PYTHON="${prefix}/bin/python2.7"
85}
86
87post-destroot   {
88                xinstall -d -m 755 ${destroot}${prefix}/etc/yum/repos.d
89                xinstall -d -m 755 ${destroot}${prefix}/var/cache/yum/release/headers
90                xinstall -d -m 755 ${destroot}${prefix}/var/cache/yum/release/packages
91                copy -force ${filespath}/yum.conf ${destroot}${prefix}/etc/yum/yum.conf
92                reinplace "s|@@PREFIX@@|$prefix|g" ${destroot}${prefix}/etc/yum/yum.conf
93                reinplace "s|@@PLATFORM@@|${os.platform}|g" ${destroot}${prefix}/etc/yum/yum.conf
94                destroot.keepdirs ${destroot}${prefix}/etc/yum/repos.d \
95                ${destroot}${prefix}/var/cache/yum/release/headers \
96                ${destroot}${prefix}/var/cache/yum/release/packages \
97                ${destroot}${prefix}/var/log \
98                ${destroot}${prefix}/var/run
99                # don't install the update notifier dbus daemon
100                delete ${destroot}${prefix}/etc/dbus-1/system.d/yum-updatesd.conf \
101                ${destroot}${prefix}/etc/rc.d/init.d/yum-updatesd \
102                ${destroot}${prefix}/etc/yum/yum-updatesd.conf \
103                ${destroot}${prefix}/sbin/yum-updatesd \
104                ${destroot}${prefix}/share/man/man5/yum-updatesd.conf.5 \
105                ${destroot}${prefix}/share/man/man8/yum-updatesd.8
106                delete ${destroot}${prefix}/etc/cron.daily \
107                ${destroot}${prefix}/etc/sysconfig
108}
109
110test.run        yes
111
112livecheck.type  regex
113# get the last modified tarball
114livecheck.url   ${master_sites}?C=M\;O=D
115livecheck.regex ${name}-(\[0-9\\.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.