michael@49: ## michael@49: ## dpkg.spec -- OpenPKG RPM Package Specification michael@626: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@49: ## michael@49: ## Permission to use, copy, modify, and distribute this software for michael@49: ## any purpose with or without fee is hereby granted, provided that michael@49: ## the above copyright notice and this permission notice appear in all michael@49: ## copies. michael@49: ## michael@49: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@49: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@49: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@49: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@49: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@49: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@49: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@49: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@49: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@49: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@49: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@49: ## SUCH DAMAGE. michael@49: ## michael@49: michael@49: # package version michael@626: %define V_tarball 1.16.8 michael@626: %define V_subdir 1.16.8 michael@49: michael@49: # package information michael@49: Name: dpkg michael@49: Summary: Debian Package Management Toolchain michael@49: URL: http://packages.debian.org/dpkg michael@49: Vendor: Ian Jackson et al. michael@49: Packager: OpenPKG Foundation e.V. michael@49: Distribution: OpenPKG Community michael@49: Class: EVAL michael@49: Group: Archiver michael@49: License: GPL michael@49: Version: %{V_tarball} michael@626: Release: 20120800 michael@49: michael@49: # list of sources michael@626: Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.xz michael@49: Patch0: dpkg.patch michael@49: michael@49: # build information michael@626: BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes michael@626: PreReq: OpenPKG, openpkg >= 20100101 michael@49: BuildPreReq: gettext, libiconv, bzip2, zlib michael@49: PreReq: gettext, libiconv, bzip2, zlib michael@49: michael@49: %description michael@49: dpkg is the heart of the Debian GNU/Linux package management michael@49: toolchain. It is the package format technology underlying APT and michael@49: other higher-level package management tools. michael@49: michael@49: %track michael@49: prog dpkg = { michael@49: version = %{version} michael@49: url = http://ftp.debian.org/debian/pool/main/d/dpkg/ michael@626: regex = dpkg_(__VER__)\.tar\.xz michael@49: } michael@49: michael@49: %prep michael@49: %setup -q -n dpkg-%{V_subdir} michael@49: %patch -p0 michael@626: %{l_shtool} subst \ michael@626: -e 's;\(defined(OSLinux)\)$;\1 || defined(OSsunos);g' \ michael@626: utils/start-stop-daemon.c michael@49: michael@49: %build michael@626: ( echo "ac_cv_header_kvm_h=no" michael@626: ) >config.cache michael@49: CC="%{l_cc}" \ michael@49: CXX="%{l_cxx}" \ michael@49: CFLAGS="%{l_cflags -O}" \ michael@49: CXXFLAGS="%{l_cxxflags -O}" \ michael@626: CPPFLAGS="%{l_cppflags} -I`pwd`" \ michael@49: LDFLAGS="%{l_ldflags}" \ michael@626: LIBS="-lintl -liconv" \ michael@49: ./configure \ michael@626: --cache-file=./config.cache \ michael@49: --prefix=%{l_prefix} \ michael@49: --mandir=%{l_prefix}/man \ michael@49: --with-libiconv-prefix=%{l_prefix} \ michael@49: --with-libintl-prefix=%{l_prefix} \ michael@49: --with-dselect \ michael@49: --without-start-stop-daemon \ michael@49: --with-admindir=%{l_prefix}/var/dpkg \ michael@49: --with-zlib \ michael@49: --with-bz2 \ michael@49: --without-selinux michael@50: %{l_make} %{l_mflags -O} michael@49: michael@49: %install michael@626: %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" michael@49: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@49: rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale michael@49: for bin in 822-date cleanup-info install-info update-alternatives; do michael@49: if [ -f $RPM_BUILD_ROOT%{l_prefix}/bin/$bin ]; then michael@49: mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \ michael@49: $RPM_BUILD_ROOT%{l_prefix}/bin/dpkg-$bin michael@49: elif [ -f $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin ]; then michael@49: mv $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin \ michael@49: $RPM_BUILD_ROOT%{l_prefix}/sbin/dpkg-$bin michael@49: fi michael@49: done michael@49: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@49: michael@49: %files -f files michael@49: michael@49: %clean michael@49: