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

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

yum: remove +python24 variant

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