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