You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

180 lines
6.3 KiB

##
## apt.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_base 0.5.15
%define V_rev 6
# package information
Name: apt
Summary: Advanced Packaging Tool
URL: https://moin.conectiva.com.br/AptRpm
Vendor: Jason Gunthorpe et al.
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: Bootstrapping
License: GPL
Version: %{V_base}.%{V_rev}
Release: 20061013
# list of sources
Source0: http://moin.conectiva.com.br/files/AptRpm/attachments/apt-%{V_base}cnc%{V_rev}.tar.bz2
Source1: apt.conf
Source2: sources.list
Source3: vendors.list
Source4: translate.list
Source5: rpmpriorities
Source6: preferences
Source7: apt-man.tar
Patch0: apt.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040217, ncurses, readline, make, gcc, autoconf
PreReq: OpenPKG, openpkg >= 20040217, ncurses, readline
AutoReq: no
AutoReqProv: no
%description
This is Connectiva's port of the Debian's Advanced Packaging Tool
(APT), running on top of the OpenPKG RPM packaging infrastructure.
APT is an advanced package management utility front-end which allows
you to easily perform package installation, upgrading and removal.
Dependencies are automatically handled.
%track
prog apt = {
disabled
comment = "rse: vcheck does not support HTTPS and HTTP access is not possible"
version = %{V_base}cnc%{V_rev}
url = http://moin.conectiva.com.br/AptRpm
regex = apt-(__VER__)\.tar\.bz2
}
%prep
%setup -q -n apt-%{V_base}cnc%{V_rev}
%patch -p0
# replace hard-coded paths with OpenPKG ones
l_rpmlibs_base="`%{l_rpm_config} --libs`"
l_rpmlibs_extra=""
case "%{l_platform -t}" in
*sunos* ) l_rpmlibs_extra="${l_rpmlibs_extra} -lsocket" ;;
esac
find . -type f ! -name "*.orig" -print | \
xargs %{l_shtool} subst -s \
%{l_value -s l_prefix} \
-e "s;@l_rpmlibs_base@;${l_rpmlibs_base};g" \
-e "s;@l_rpmlibs_extra@;${l_rpmlibs_extra};g"
# regenerate GNU autoconf based files
%{l_prefix}/bin/autoconf
%build
# configure package
defines="-DOLD_FLATSCHEME"
case "%{l_platform -t}" in
*sunos* ) defines="$defines -DOPENPKG_SOLARIS" ;;
esac
CC="%{l_cc}" \
CPPFLAGS="%{l_cppflags} `%{l_rpm_config} --cppflags` $defines" \
CFLAGS="%{l_cflags} `%{l_rpm_config} --cflags`" \
LDFLAGS="%{l_ldflags} `%{l_rpm_config} --ldflags`" \
RPM_PATH="%{l_rpm}" \
./configure \
--prefix=%{l_prefix} \
--libdir=%{l_prefix}/lib \
--localstatedir=%{l_prefix}/var/apt \
--disable-shared \
--enable-static \
--disable-nls \
--disable-docs
# disable localization stuff
%{l_shtool} subst \
-e 's;^POFILES =.*$;POFILES =;g' \
-e 's;^GMOFILES =.*$;GMOFILES =;g' \
-e 's;^DUMMYPOFILES =.*$;DUMMYPOFILES =;g' \
-e 's;^CATALOGS =.*$;CATALOGS =;g' \
po/Makefile
# build package
%{l_make} %{l_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# install package
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
# create still missing directories
%{l_shtool} mkdir -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/lib/apt/scripts \
$RPM_BUILD_ROOT%{l_prefix}/var/apt/lib/lists/partial \
$RPM_BUILD_ROOT%{l_prefix}/var/apt/cache/archives/partial
# install pre-generated manual pages
%{l_tar} xf %{SOURCE apt-man.tar}
%{l_shtool} mkdir -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/man/man5 \
$RPM_BUILD_ROOT%{l_prefix}/man/man8
%{l_shtool} install -c -m 644 \
apt-man/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
%{l_shtool} install -c -m 644 \
apt-man/*.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
# install default configuration files
%{l_shtool} mkdir -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/apt.conf.d \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/vendor.list.d \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/sources.list.d \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/translate.list.d
%{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE apt.conf} %{SOURCE rpmpriorities} %{SOURCE preferences} \
%{SOURCE sources.list} %{SOURCE vendors.list} %{SOURCE translate.list} \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/
%{l_shtool} install -c -m 644 \
doc/examples/configure-index \
$RPM_BUILD_ROOT%{l_prefix}/etc/apt/apt.conf.idx
# strip down installation
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
strip $RPM_BUILD_ROOT%{l_prefix}/lib/apt/methods/* >/dev/null 2>&1 || true
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/etc/apt/apt.conf' \
'%config %{l_prefix}/etc/apt/rpmpriorities' \
'%config %{l_prefix}/etc/apt/preferences' \
'%config %{l_prefix}/etc/apt/*.list'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT