dpkg.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## dpkg.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_tarball 1.15.3.1
  25. %define V_subdir 1.15.3.1
  26. # package information
  27. Name: dpkg
  28. Summary: Debian Package Management Toolchain
  29. URL: http://packages.debian.org/dpkg
  30. Vendor: Ian Jackson et al.
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Archiver
  35. License: GPL
  36. Version: %{V_tarball}
  37. Release: 20090709
  38. # list of sources
  39. Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.gz
  40. Patch0: dpkg.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, gcc::with_cxx = yes
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. BuildPreReq: gettext, libiconv, bzip2, zlib
  47. PreReq: gettext, libiconv, bzip2, zlib
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. dpkg is the heart of the Debian GNU/Linux package management
  52. toolchain. It is the package format technology underlying APT and
  53. other higher-level package management tools.
  54. %track
  55. prog dpkg = {
  56. version = %{version}
  57. url = http://ftp.debian.org/debian/pool/main/d/dpkg/
  58. regex = dpkg_(__VER__)\.tar\.gz
  59. }
  60. %prep
  61. %setup -q -n dpkg-%{V_subdir}
  62. %patch -p0
  63. %build
  64. CC="%{l_cc}" \
  65. CXX="%{l_cxx}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. CXXFLAGS="%{l_cxxflags -O}" \
  68. CPPFLAGS="%{l_cppflags}" \
  69. LDFLAGS="%{l_ldflags}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --mandir=%{l_prefix}/man \
  73. --with-libiconv-prefix=%{l_prefix} \
  74. --with-libintl-prefix=%{l_prefix} \
  75. --without-included-gettext \
  76. --with-dselect \
  77. --without-start-stop-daemon \
  78. --with-admindir=%{l_prefix}/var/dpkg \
  79. --with-zlib \
  80. --with-bz2 \
  81. --without-selinux
  82. %{l_make} %{l_mflags}
  83. %install
  84. rm -rf $RPM_BUILD_ROOT
  85. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  88. for bin in 822-date cleanup-info install-info update-alternatives; do
  89. if [ -f $RPM_BUILD_ROOT%{l_prefix}/bin/$bin ]; then
  90. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \
  91. $RPM_BUILD_ROOT%{l_prefix}/bin/dpkg-$bin
  92. elif [ -f $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin ]; then
  93. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin \
  94. $RPM_BUILD_ROOT%{l_prefix}/sbin/dpkg-$bin
  95. fi
  96. done
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT