source: trunk/dports/sysutils/rpm50/Portfile @ 76683

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

mark the rpm 5.0.x and 5.1.x ports as being replaced by rpm 5.2.x,
which is in turn replaced by rpm 5.3.x (no port, use cvs/devtool)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 76683 2011-03-05 14:45:35Z afb@macports.org $
2
3PortSystem 1.0
4
5name                    rpm50
6version                 5.0.3
7revision                2
8platforms               darwin freebsd linux
9categories              sysutils archivers
10maintainers             mac.com:n3npq afb
11description             The RPM package management system.
12long_description        The RPM Package Manager (RPM) is a powerful command line driven \
13                        package management system capable of installing, uninstalling, \
14                        verifying, querying, and updating software packages. Each software \
15                        package consists of an archive of files along with information about \
16                        the package like its version, a description, etc.
17
18homepage                http://rpm5.org
19master_sites            ${homepage}/files/rpm/rpm-5.0/
20distname                rpm-${version}
21checksums               md5 b3df4e54e84cf3344ce6b76fa2a8d5bf \
22                        sha1 d3461710de17a8f7dc3e49371d7edf620b10c27e \
23                        rmd160 d26cdfef5a3bf18442e1825d810afb32bcfa2161
24worksrcdir              rpm-${version}
25
26replaced_by             rpm52
27
28depends_build           port:expat port:neon \
29                        port:python25 port:perl5.8 \
30                        port:readline port:beecrypt \
31                        port:libiconv port:gettext
32
33depends_lib             lib:libhistory.5:readline port:gettext \
34                        port:popt port:sqlite3 port:xar port:liblzma port:pcre
35
36depends_run             port:openssl \
37                        bin:gzip:gzip \
38                        bin:bzip2:bzip2 \
39                        bin:unzip:unzip
40
41patchfiles              patch-macros.in patch-xz-support patch-configure.ac
42post-patch {
43        reinplace "s:AC_DEFUN:m4_define:g" ${worksrcpath}/configure.ac
44        reinplace "s:pkgincHEADERS_INSTALL:INSTALL_HEADER:" ${worksrcpath}/rpmdb/Makefile.am
45        reinplace "s:pkglibPROGRAMS_INSTALL:INSTALL_PROGRAM:g" ${worksrcpath}/tools/Makefile.am
46}
47
48build.type              gnu
49
50depends_build-append    port:autoconf port:automake port:libtool port:gettext
51pre-configure {
52        system "cd ${worksrcpath}; ./autogen.sh"
53}
54
55configure.args          --disable-nls --without-javaglue --without-included-gettext \
56                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
57                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
58                        --with-python=2.5 --with-perl --with-sqlite --with-dbapi=sqlite \
59                        --with-xar=external --with-xz=external --with-pcre=external \
60                        --without-apidocs --sysconfdir=${prefix}/etc --with-path-cfg=${prefix}/etc/rpm
61configure.env           __PYTHON=${prefix}/bin/python2.5 __PERL=${prefix}/bin/perl5.8
62
63
64configure.args-append   --with-lua=internal --with-db=internal
65configure.cppflags-append       -I${prefix}/include/xar
66
67post-destroot {
68        xinstall -d -m 755 ${destroot}${prefix}/etc/rpm
69        system "${worksrcpath}/rpm --macros=${worksrcpath}/macros --eval='%{_target_platform}' > ${destroot}${prefix}/etc/rpm/platform"
70        system "${worksrcpath}/rpm --macros=${worksrcpath}/macros --eval='noarch-%{_target_vendor}-%{_target_os}%{?_gnu}' >> ${destroot}${prefix}/etc/rpm/platform"
71
72        delete [glob ${destroot}${prefix}/lib/perl5/*/*/*/auto/RPM/.packlist]
73        delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
74
75        # where the RPM database lives
76        destroot.keepdirs ${destroot}${prefix}/etc/rpm\
77                          ${destroot}${prefix}/var/lib/rpm\
78                          ${destroot}${prefix}/var/spool/repackage\
79                          ${destroot}${prefix}/src/rpm/BUILD\
80                          ${destroot}${prefix}/src/rpm/RPMS\
81                          ${destroot}${prefix}/src/rpm/SOURCES\
82                          ${destroot}${prefix}/src/rpm/SPECS\
83                          ${destroot}${prefix}/src/rpm/SRPMS
84}
85
86platform darwin {
87        configure.args-append --disable-optimized --disable-aio \
88                              --with-glob --enable-broken-chown \
89                              --disable-rpath
90
91        post-destroot {
92                # Mac OS X specific changes
93        }
94}
95
96platform freebsd {
97
98        post-destroot {
99                # FreeBSD specific changes
100                reinplace "s;/usr/bin/tar;/usr/local/bin/gtar;" ${destroot}${prefix}/lib/rpm/macros
101                reinplace "s;/usr/bin/make;/usr/local/bin/gmake;" ${destroot}${prefix}/lib/rpm/macros
102        }
103}
104
105platform linux {
106
107        post-destroot {
108                # Linux specific changes
109        }
110}
111
112variant docs description "API documentation" {
113        depends_run-append bin:doxygen:doxygen
114        configure.args-delete --without-apidocs
115        configure.args-append --with-apidocs
116}
Note: See TracBrowser for help on using the repository browser.