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

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

yum: revert errors in changes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 91199 2012-03-25 18:39:32Z 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 python24 conflicts python25 python26 description "use python 2.4" {
58        depends_lib-append      port:python24 port:py-celementtree port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser port:py-iniparse port:py-pygpgme
59        depends_build-append    port:py24-nose
60        set python.bin          ${prefix}/bin/python2.4
61}
62
63variant python25 conflicts python24 python26 description "use python 2.5" {
64        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
65        depends_build-append    port:py25-nose
66        set python.bin          ${prefix}/bin/python2.5
67}
68
69variant python26 conflicts python24 python25 description "use python 2.6" {
70        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
71        depends_build-append    port:py26-nose
72        set python.bin          ${prefix}/bin/python2.6
73}
74
75if {![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26]} {
76        default_variants +python24
77}
78
79post-destroot   {
80                xinstall -d -m 755 ${destroot}${prefix}/etc/yum/repos.d
81                xinstall -d -m 755 ${destroot}${prefix}/var/cache/yum/release/headers
82                xinstall -d -m 755 ${destroot}${prefix}/var/cache/yum/release/packages
83                copy -force ${filespath}/yum.conf ${destroot}${prefix}/etc/yum/yum.conf
84                reinplace "s|@@PREFIX@@|$prefix|g" ${destroot}${prefix}/etc/yum/yum.conf
85                reinplace "s|@@PLATFORM@@|${os.platform}|g" ${destroot}${prefix}/etc/yum/yum.conf
86                destroot.keepdirs ${destroot}${prefix}/etc/yum/repos.d \
87                ${destroot}${prefix}/var/cache/yum/release/headers \
88                ${destroot}${prefix}/var/cache/yum/release/packages \
89                ${destroot}${prefix}/var/log \
90                ${destroot}${prefix}/var/run
91                # don't install the update notifier dbus daemon
92                delete ${destroot}${prefix}/etc/dbus-1/system.d/yum-updatesd.conf \
93                ${destroot}${prefix}/etc/rc.d/init.d/yum-updatesd \
94                ${destroot}${prefix}/etc/yum/yum-updatesd.conf \
95                ${destroot}${prefix}/sbin/yum-updatesd \
96                ${destroot}${prefix}/share/man/man5/yum-updatesd.conf.5 \
97                ${destroot}${prefix}/share/man/man8/yum-updatesd.8
98                delete ${destroot}${prefix}/etc/cron.daily \
99                ${destroot}${prefix}/etc/sysconfig
100}
101
102test.run        yes
103
104livecheck.type  regex
105# get the last modified tarball
106livecheck.url   ${master_sites}?C=M\;O=D
107livecheck.regex ${name}-(\[0-9\\.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.