Sun, 03 Apr 2011 13:34:55 +0200
Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.
Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.
michael@49 | 1 | ## |
michael@49 | 2 | ## dpkg.spec -- OpenPKG RPM Package Specification |
michael@49 | 3 | ## Copyright (c) 2000-2008 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@49 | 25 | %define V_tarball 1.14.24 |
michael@49 | 26 | %define V_subdir 1.14.24 |
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@50 | 39 | Release: 20090106 |
michael@49 | 40 | |
michael@49 | 41 | # list of sources |
michael@49 | 42 | Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.gz |
michael@49 | 43 | Patch0: dpkg.patch |
michael@49 | 44 | |
michael@49 | 45 | # build information |
michael@49 | 46 | Prefix: %{l_prefix} |
michael@49 | 47 | BuildRoot: %{l_buildroot} |
michael@85 | 48 | BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes |
michael@49 | 49 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@49 | 50 | BuildPreReq: gettext, libiconv, bzip2, zlib |
michael@49 | 51 | PreReq: gettext, libiconv, bzip2, zlib |
michael@49 | 52 | AutoReq: no |
michael@49 | 53 | AutoReqProv: no |
michael@49 | 54 | |
michael@49 | 55 | %description |
michael@49 | 56 | dpkg is the heart of the Debian GNU/Linux package management |
michael@49 | 57 | toolchain. It is the package format technology underlying APT and |
michael@49 | 58 | other higher-level package management tools. |
michael@49 | 59 | |
michael@49 | 60 | %track |
michael@49 | 61 | prog dpkg = { |
michael@49 | 62 | version = %{version} |
michael@49 | 63 | url = http://ftp.debian.org/debian/pool/main/d/dpkg/ |
michael@49 | 64 | regex = dpkg_(__VER__)\.tar\.gz |
michael@49 | 65 | } |
michael@49 | 66 | |
michael@49 | 67 | %prep |
michael@49 | 68 | %setup -q -n dpkg-%{V_subdir} |
michael@49 | 69 | %patch -p0 |
michael@49 | 70 | |
michael@49 | 71 | %build |
michael@49 | 72 | CC="%{l_cc}" \ |
michael@49 | 73 | CXX="%{l_cxx}" \ |
michael@49 | 74 | CFLAGS="%{l_cflags -O}" \ |
michael@49 | 75 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@49 | 76 | CPPFLAGS="%{l_cppflags}" \ |
michael@49 | 77 | LDFLAGS="%{l_ldflags}" \ |
michael@49 | 78 | ./configure \ |
michael@49 | 79 | --prefix=%{l_prefix} \ |
michael@49 | 80 | --mandir=%{l_prefix}/man \ |
michael@49 | 81 | --with-libiconv-prefix=%{l_prefix} \ |
michael@49 | 82 | --with-libintl-prefix=%{l_prefix} \ |
michael@49 | 83 | --without-included-gettext \ |
michael@49 | 84 | --with-dselect \ |
michael@49 | 85 | --without-start-stop-daemon \ |
michael@49 | 86 | --with-admindir=%{l_prefix}/var/dpkg \ |
michael@49 | 87 | --with-zlib \ |
michael@49 | 88 | --with-bz2 \ |
michael@49 | 89 | --without-selinux |
michael@50 | 90 | %{l_make} %{l_mflags -O} |
michael@49 | 91 | |
michael@49 | 92 | %install |
michael@49 | 93 | rm -rf $RPM_BUILD_ROOT |
michael@50 | 94 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT LINGUAS=doit |
michael@49 | 95 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@49 | 96 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
michael@49 | 97 | for bin in 822-date cleanup-info install-info update-alternatives; do |
michael@49 | 98 | if [ -f $RPM_BUILD_ROOT%{l_prefix}/bin/$bin ]; then |
michael@49 | 99 | mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \ |
michael@49 | 100 | $RPM_BUILD_ROOT%{l_prefix}/bin/dpkg-$bin |
michael@49 | 101 | elif [ -f $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin ]; then |
michael@49 | 102 | mv $RPM_BUILD_ROOT%{l_prefix}/sbin/$bin \ |
michael@49 | 103 | $RPM_BUILD_ROOT%{l_prefix}/sbin/dpkg-$bin |
michael@49 | 104 | fi |
michael@49 | 105 | done |
michael@49 | 106 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@49 | 107 | |
michael@49 | 108 | %files -f files |
michael@49 | 109 | |
michael@49 | 110 | %clean |
michael@49 | 111 | rm -rf $RPM_BUILD_ROOT |
michael@49 | 112 |