source: trunk/dports/sysutils/yum/Portfile

Last change on this file was 124022, checked in by afb@…, 3 years ago

upgrade to python27 and perl5.16

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