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.
1 ##
2 ## dpkg.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2012 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 ##
24 # package version
25 %define V_tarball 1.16.8
26 %define V_subdir 1.16.8
28 # package information
29 Name: dpkg
30 Summary: Debian Package Management Toolchain
31 URL: http://packages.debian.org/dpkg
32 Vendor: Ian Jackson et al.
33 Packager: OpenPKG Foundation e.V.
34 Distribution: OpenPKG Community
35 Class: EVAL
36 Group: Archiver
37 License: GPL
38 Version: %{V_tarball}
39 Release: 20120800
41 # list of sources
42 Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.xz
43 Patch0: dpkg.patch
45 # build information
46 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes
47 PreReq: OpenPKG, openpkg >= 20100101
48 BuildPreReq: gettext, libiconv, bzip2, zlib
49 PreReq: gettext, libiconv, bzip2, zlib
51 %description
52 dpkg is the heart of the Debian GNU/Linux package management
53 toolchain. It is the package format technology underlying APT and
54 other higher-level package management tools.
56 %track
57 prog dpkg = {
58 version = %{version}
59 url = http://ftp.debian.org/debian/pool/main/d/dpkg/
60 regex = dpkg_(__VER__)\.tar\.xz
61 }
63 %prep
64 %setup -q -n dpkg-%{V_subdir}
65 %patch -p0
66 %{l_shtool} subst \
67 -e 's;\(defined(OSLinux)\)$;\1 || defined(OSsunos);g' \
68 utils/start-stop-daemon.c
70 %build
71 ( echo "ac_cv_header_kvm_h=no"
72 ) >config.cache
73 CC="%{l_cc}" \
74 CXX="%{l_cxx}" \
75 CFLAGS="%{l_cflags -O}" \
76 CXXFLAGS="%{l_cxxflags -O}" \
77 CPPFLAGS="%{l_cppflags} -I`pwd`" \
78 LDFLAGS="%{l_ldflags}" \
79 LIBS="-lintl -liconv" \
80 ./configure \
81 --cache-file=./config.cache \
82 --prefix=%{l_prefix} \
83 --mandir=%{l_prefix}/man \
84 --with-libiconv-prefix=%{l_prefix} \
85 --with-libintl-prefix=%{l_prefix} \
86 --with-dselect \
87 --without-start-stop-daemon \
88 --with-admindir=%{l_prefix}/var/dpkg \
89 --with-zlib \
90 --with-bz2 \
91 --without-selinux
92 %{l_make} %{l_mflags -O}
94 %install
95 %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
96 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
97 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
98 for bin in 822-date cleanup-info install-info update-alternatives; do
99 if [ -f $RPM_BUILD_ROOT%{l_prefix}/bin/$bin ]; then
100 mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \
101 $RPM_BUILD_ROOT%{l_prefix}/bin/dpkg-$bin
102 elif [ -f $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin ]; then
103 mv $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin \
104 $RPM_BUILD_ROOT%{l_prefix}/sbin/dpkg-$bin
105 fi
106 done
107 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
109 %files -f files
111 %clean