dpkg.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## dpkg.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2011 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.16.0
  25. %define V_subdir 1.16.0
  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: 20110402
  38. # list of sources
  39. Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.bz2
  40. Patch0: dpkg.patch
  41. # build information
  42. BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes
  43. PreReq: OpenPKG, openpkg >= 20100101
  44. BuildPreReq: gettext, libiconv, bzip2, zlib
  45. PreReq: gettext, libiconv, bzip2, zlib
  46. %description
  47. dpkg is the heart of the Debian GNU/Linux package management
  48. toolchain. It is the package format technology underlying APT and
  49. other higher-level package management tools.
  50. %track
  51. prog dpkg = {
  52. version = %{version}
  53. url = http://ftp.debian.org/debian/pool/main/d/dpkg/
  54. regex = dpkg_(__VER__)\.tar\.bz2
  55. }
  56. %prep
  57. %setup -q -n dpkg-%{V_subdir}
  58. %patch -p0
  59. %build
  60. CC="%{l_cc}" \
  61. CXX="%{l_cxx}" \
  62. CFLAGS="%{l_cflags -O}" \
  63. CXXFLAGS="%{l_cxxflags -O}" \
  64. CPPFLAGS="%{l_cppflags} -I`pwd`" \
  65. LDFLAGS="%{l_ldflags}" \
  66. LIBS="-lintl -liconv" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --mandir=%{l_prefix}/man \
  70. --with-libiconv-prefix=%{l_prefix} \
  71. --with-libintl-prefix=%{l_prefix} \
  72. --with-dselect \
  73. --without-start-stop-daemon \
  74. --with-admindir=%{l_prefix}/var/dpkg \
  75. --with-zlib \
  76. --with-bz2 \
  77. --without-selinux
  78. %{l_make} %{l_mflags}
  79. %install
  80. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  81. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  82. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  83. for bin in 822-date cleanup-info install-info update-alternatives; do
  84. if [ -f $RPM_BUILD_ROOT%{l_prefix}/bin/$bin ]; then
  85. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \
  86. $RPM_BUILD_ROOT%{l_prefix}/bin/dpkg-$bin
  87. elif [ -f $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin ]; then
  88. mv $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin \
  89. $RPM_BUILD_ROOT%{l_prefix}/sbin/dpkg-$bin
  90. fi
  91. done
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean