| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- ##
- ## apt.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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 information
- Name: apt
- Summary: Advanced Packaging Tool
- URL: https://moin.conectiva.com.br/AptRpm
- Vendor: Jason Gunthorpe et al.
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: Bootstrapping
- License: GPL
- Version: 0.5.5cnc6
- Release: 20030915
- # list of sources
- Source0: http://moin.conectiva.com.br/files/AptRpm/attachments/apt-%{version}.tar.bz2
- Source1: apt.conf
- Source2: rpmpriorities
- Patch0: apt.patch
- Patch1: apt.patch.porting
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20030913, make, gcc, autoconf
- PreReq: OpenPKG, openpkg >= 20030913
- 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.
- %prep
- %setup -q
- %patch0 -p0
- # platform specific patching
- l_rpmlibs=""
- case "%{l_platform -t}" in
- *sunos* )
- %patch1 -p0
- l_rpmlibs="${l_rpmlibs} -lsocket"
- ;;
- esac
- # replace hard-coded paths with OpenPKG ones
- find . -type f ! -name "*.orig" -print | \
- xargs %{l_shtool} subst \
- %{l_value -s l_prefix} \
- -e 's;@l_bindir@;%{l_prefix}/bin;g' \
- -e 's;@name@;apt;g' \
- -e "s;@dbpath@;%{_dbpath};g" \
- -e "s;@rpmlibs@;`%{l_prefix}/bin/rpm-config --libs`;g" \
- -e "s;@l_rpmlibs@;${l_rpmlibs};g"
- # regenerate GNU autoconf based files
- %{l_prefix}/bin/autoconf
- %build
- # configure package
- CC="%{l_cc}" \
- CPPFLAGS="%{l_cppflags} `%{l_prefix}/bin/rpm-config --cppflags`" \
- CFLAGS="%{l_cflags} `%{l_prefix}/bin/rpm-config --cflags`" \
- LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/rpm-config --ldflags`" \
- ./configure \
- --prefix=%{l_prefix} \
- --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
- # remove file that conflicts with 'grep' package
- rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
- # create directory for local state
- for dir in lib/lists lib/lists/partial cache/archives/partial; do
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/apt/$dir
- done
- # install default (blank) configuration files
- %{l_shtool} mkdir -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/apt
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE apt.conf} %{SOURCE rpmpriorities} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/apt/
- # strip down installation
- 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}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|