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
RevLine 
[20470]1# $Id: Portfile 26411 2007-06-22 00:09:50Z afb@macports.org $
[2138]2
[2137]3PortSystem 1.0
[26285]4
[12757]5name                    rpm
[26268]6version                 4.4.9
[2137]7platforms               darwin
8categories              sysutils archivers
[12697]9maintainers             n3npq@mac.com
10description             The RPM package management system.
[26315]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.
[2137]16
[26259]17homepage                http://rpm5.org
[26285]18master_sites            ${homepage}/files/${name}/${name}-4.4
[26268]19checksums               md5 210b768006e7d88dd8a3bcd498ea27f6
[2137]20
[26285]21depends_build           port:expat port:neon \
22                        port:python24 port:popt \
23                        port:readline port:beecrypt \
24                        port:libiconv port:gettext
25
[19685]26depends_lib             lib:libhistory.5:readline port:gettext \
27                        lib:libsqlite3.0:sqlite3
[13276]28
[22917]29depends_run             port:gzip \
30                        port:openssl \
31                        port:bzip2 \
32                        port:perl5.8
[12718]33
[26315]34build.type              gnu
[2137]35
[12697]36configure.args          --disable-nls --without-javaglue --without-included-gettext \
37                        --with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
[13704]38                        --mandir=${prefix}/share/man --infodir=${prefix}/share/info \
[26411]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
[5195]42
[26411]43patchfiles              patch-macros.in \
44                        patch-configure \
45                        patch-rpmevr.h \
46                        patch-parseBuildInstallClean.c
[12697]47
[26411]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
[26285]71platform darwin {
[2713]72        pre-configure {
[26285]73                      xinstall -d -m 755 ${workpath}/librt
[26315]74                      ln -sf /usr/lib/libSystem.B.dylib ${workpath}/librt/librt.dylib
[12697]75        }
76
[2137]77        configure.args-append --disable-optimized --disable-aio \
[26285]78                              --with-lua --with-glob --enable-broken-chown \
79                              --disable-rpath
[2137]80
[26286]81        configure.cppflags-append -I${prefix}/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
[26285]82        configure.ldflags-append -L${workpath}/librt
[2137]83
[3173]84        post-destroot {
[26411]85                # MacOSX specific changes
86                reinplace "s;\blibtoolize\b;glibtoolize;" ${destroot}${prefix}/lib/rpm/macros
[2137]87        }
88}
[26285]89
[26315]90
[26285]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.