source: trunk/dports/sysutils/rpm/Portfile @ 26411

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

Update the RPM port so that it actually works

  • fix the linking issues with popt/sqlite3
  • remove all fixed locations of binaries
  • patch minor header issue for C++/APT-RPM
  • make removing the %{buildroot} optional!
  • move configuration back from /etc/rpm
  • move temporaries back from /var/tmp
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# $Id: Portfile 26411 2007-06-22 00:09:50Z afb@macports.org $
2
3PortSystem 1.0
4
5name                    rpm
6version                 4.4.9
7platforms               darwin
8categories              sysutils archivers
9maintainers             n3npq@mac.com
10description             The RPM package management system.
11long_description        The RPM Package Manager (RPM) is a powerful command line driven \
12                        package management system capable of installing, uninstalling, \
13                        verifying, querying, and updating software packages. Each software \
14                        package consists of an archive of files along with information about \
15                        the package like its version, a description, etc.
16
17homepage                http://rpm5.org
18master_sites            ${homepage}/files/${name}/${name}-4.4
19checksums               md5 210b768006e7d88dd8a3bcd498ea27f6
20
21depends_build           port:expat port:neon \
22                        port:python24 port:popt \
23                        port:readline port:beecrypt \
24                        port:libiconv port:gettext
25
26depends_lib             lib:libhistory.5:readline port:gettext \
27                        lib:libsqlite3.0:sqlite3
28
29depends_run             port:gzip \
30                        port:openssl \
31                        port:bzip2 \
32                        port:perl5.8
33
34build.type              gnu
35
36configure.args          --disable-nls --without-javaglue --without-included-gettext \
37                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
38                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
39                        --with-python=2.4 --sysconfdir=${prefix}/etc/rpm
40                        # needed because it checks for sqlite3_open in sqlite lib...
41configure.env           ac_cv_lib_sqlite_sqlite3_open=yes
42
43patchfiles              patch-macros.in \
44                        patch-configure \
45                        patch-rpmevr.h \
46                        patch-parseBuildInstallClean.c
47
48post-patch {
49        # use external popt library
50        delete ${worksrcpath}/popt
51}
52
53post-destroot {
54        # MacPorts specific changes
55        reinplace "s;%{_usrsrc}/rpm;%{_usrsrc}/macports;" ${destroot}${prefix}/lib/rpm/macros
56
57        xinstall -d -m 755 ${prefix}/etc/rpm
58                     
59        delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
60
61        # where the RPM database lives
62        destroot.keepdirs ${destroot}${prefix}/etc/rpm\
63                          ${destroot}${prefix}/var/lib/rpm\
64                          ${destroot}${prefix}/src/macports/BUILD\
65                          ${destroot}${prefix}/src/macports/RPMS\
66                          ${destroot}${prefix}/src/macports/SOURCES\
67                          ${destroot}${prefix}/src/macports/SPECS\
68                          ${destroot}${prefix}/src/macports/SRPMS
69}
70
71platform darwin {
72        pre-configure {
73                      xinstall -d -m 755 ${workpath}/librt
74                      ln -sf /usr/lib/libSystem.B.dylib ${workpath}/librt/librt.dylib
75        }
76
77        configure.args-append --disable-optimized --disable-aio \
78                              --with-lua --with-glob --enable-broken-chown \
79                              --disable-rpath
80
81        configure.cppflags-append -I${prefix}/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
82        configure.ldflags-append -L${workpath}/librt
83
84        post-destroot {
85                # MacOSX specific changes
86                reinplace "s;\blibtoolize\b;glibtoolize;" ${destroot}${prefix}/lib/rpm/macros
87        }
88}
89
90
91variant docs {
92        depends_run-append bin:doxygen:doxygen 
93        configure.args-append --with-apidocs
94}
Note: See TracBrowser for help on using the repository browser.