Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 067f3d061c24bfda3b85d1d8bfbfb9bf > files > 23

apt-0.5.15lorg3.94-9.mga3.src.rpm

#Mageia version adapted from Caixa Magica's apt package

%define	name		apt
%define version		0.5.15lorg3.94
%define versionadd	pt
%define release         %mkrel 9
%define _lib_name	%{name}-pkg
%define lib_name_orig	lib%{_lib_name}
%define major		4
%define libname		%mklibname %_lib_name %major
%define libnamedevel	%mklibname %_lib_name %major -d


Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Debian's Advanced Packaging Tool with RPM support 
Group:		System/Packaging
Url:		http://www.apt-rpm.org/
License:	GPLv2+
Source0: 	http://apt-rpm.org/releases/%{name}-%{version}%{versionadd}.tar.bz2	
Source1:	%{name}-apt.conf
Source2:	%{name}-sources.list
Source3:	%{name}-vendors.list
Source4:	%{name}-rpmpriorities
Source5:	%{name}-mageia.conf
# not used
Source8:	apt-pbo

## from Caixa Magica's apt:
# URPM Lists support 
# DUDF MANCOOSI project support
# Rollback, URPM, DUDF and pbo features 
Patch1:		%{name}-git-cm15-05.patch.bz2

# enhance the sorting by taking Obsoletes into account
Patch3:		apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch
# TODO document this patch
Patch8:		%{name}-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch
# alternative scoring method ( PreDepends implies -1 instead of +50 )
Patch9:		%{name}-0.5.4cnc9-alt-pkgorderlist_score.patch
# add # to the list of the forbidden characters in the name of cdrom
Patch11:	apt-0.5.15lorg3.2-alt-specialchars.patch

# s/de_DE/de/ and  /it_IT/it/ in po files
Patch14:	%{name}-invalid-lc-messages-dir.patch

# use the moo
Patch15:	apt-moo.patch

# a quick bugfix to make build-dep work
Patch18:	%{name}-build-dep.patch

# (cjw) fix segfault on large transactions by removing call to rpmReadConfigFiles()0 
#       that isn't needed
Patch25:	apt-0.5.15lorg3.94pt-drop-unneeded-rpmReadConfigFiles.patch

# (cjw) from git: fix build with rpm 4.9
Patch26:	apt.git-dfcec4ea45210b5d83ab65ecadb35001c7d39913.patch
Patch27:	apt.git-3b4e4dcf7a86f96da1124c6913ff7e66e4f1ccff.patch
# (cjw) caixa magica rpm 4.9 fixes
Patch28:	apt-cm-rpm4.9.patch
# (cjw) _dbapi macro disappeared, so drop the rpm backwards compatibility code using it
Patch29:	apt-0.5.15lorg3.94pt-rpm4.9-dbapi.patch
# (cjw) fix build with glibc 2.16
Patch30:	apt-0.5.15-glibc-2.16.patch
# (cjw) fix for ABI breakage hacked into RPM for /usr move
Patch31:	apt-0.5.15lorg3.94pt-ignore-usrmove_hack_in_rpm.patch

Requires:	gnupg
Requires: 	gzip
Requires:	%{name}-common
BuildRequires:	gettext-devel
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	rpm-devel >= 4.6
# BuildRequires:  python-devel
BuildRequires:  libpopt-devel 
BuildRequires:  libxml2-devel 
BuildRequires:  sqlite3-devel
BuildRequires:  lua5.1-devel
BuildRequires:  perl
BuildRequires:  jsoncpp-devel >= 0.5.0
Epoch: 1

%description
A port of Debian's apt tools for RPM based distributions. 
Original RPM port done by and for Conectiva. It provides 
the apt-get utility that provides a simple way to install 
and upgrade packages. APT features complete installation 
ordering, multiple source capability and several other 
unique features. 

%package -n %{libname}
Summary:	Libraries for %{name}
Group:		System/Libraries
Provides:	%{lib_name_orig} = %{epoch}:%{version}-%{release}
Requires:	%name-common
#For uuidgen
Requires:	e2fsprogs

%description -n %{libname}
This package contains APT's libapt-pkg package manipulation library
modified for RPM.

%package -n %{libnamedevel}
Summary:	Development files for %{name}
Group:		Development/C
Requires:	%{libname} = %{epoch}:%{version}-%{release}
Provides:	%{lib_name_orig}-devel
# only header files in this package...
Requires:	jsoncpp-devel

%description -n %{libnamedevel}
This package contains the header files and static libraries for
developing with APT's libapt-pkg package manipulation library,
modified for RPM.

%package pbo
Summary:	Alternate dependency solver for apt.
Group:		System/Packaging
BuildArch:	noarch
Requires:	%{name}-common
Requires:	perl
Requires:	minisat+
Requires:	perl-libapt-pkg
%description pbo
Alternate dependency solver for the apt package manager.
Currently in testing.

%package common
Summary:	Common file for %{name} frontend
Group:		System/Packaging
%description common
This package contains the needed files for various apt-frontend, 
such as synaptic, aptitude.

%prep
%setup -q -n %{name}-%{version}%{versionadd}
%patch1 -p1
%patch3 -p1 -b .scores
%patch8 -p1 -b .checkrconflicts
%patch9 -p1 -b .predepends-scores
%patch11 -p1 -b .specialchars
%patch14 -p1
%patch15 -p1 -b .moo
%patch18 -p1 -b .build-dep-fix
%patch26 -p1 -b .headerUnlink
%patch27 -p1 -b .fdLink+fdFree
%patch28 -p1 -b .cm-rpm4.9
%patch29 -p1 -b .dbapi
%patch25 -p1 -b .segfault
%patch30 -p1 -b .glibc2_16
%patch31 -p1 -b .usrmove_broken_rpm

cat %{SOURCE1} > apt.conf
sed 's/%%ARCH%%/%{_target_cpu}/' %{SOURCE2} > sources.list
cat %{SOURCE3} > vendors.list
cat %{SOURCE4} > rpmpriorities
cat %{SOURCE5} > mageia.conf

%build
rm -f configure
libtoolize --copy --force --install
aclocal -I m4
automake -a -c
autoconf
%configure2_5x 

# This next line is necessary because of the invalid-lc-messages-dir patch
(cd po; cp -f de_DE.po de.po; cp -f it_IT.po it.po)


# Parallel make is taken account in the configure script
%make NOISY=1

#( cd python; %make )

%install
cat <<EOF >README.Mageia
This version uses the synthesis form of the hdlist which is specified as a urpm 
source. The "rpm" source represents a debian-style pkglist, so full hdlists 
cannot be used anymore.

EOF

rm -rf $RPM_BUILD_ROOT
%makeinstall
rm -rf $RPM_BUILD_ROOT%{_bindir}/apt-pbo

install -d -m 755 $RPM_BUILD_ROOT/var/cache/%{name}/archives/partial
install -d -m 755 $RPM_BUILD_ROOT/var/lib/%{name}/lists/partial

install -d -m 755 $RPM_BUILD_ROOT%{_includedir}/apt-pkg
mv $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_includedir}/apt-pkg

install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt
echo "APT::Install-Suggests \"true\";" > $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d/01-suggests.conf
install -m 644 apt.conf $RPM_BUILD_ROOT%{_sysconfdir}/apt
install -m 644 *.list $RPM_BUILD_ROOT%{_sysconfdir}/apt
install -m 644 rpmpriorities $RPM_BUILD_ROOT%{_sysconfdir}/apt

install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d
install -m 644 mageia.conf $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d

install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt/translate.list.d

install -d -m 755 $RPM_BUILD_ROOT%{_var}/lib/apt/dudf

#install -d -m 755 $RPM_BUILD_ROOT%{_sbindir}
#install -m 755 %SOURCE8 $RPM_BUILD_ROOT%{_sbindir}

install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
#AG: Script directory, this should really be created by "make install" itself
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/apt/scripts

%find_lang %{name}
%find_lang %{lib_name_orig}-pkg3.3
cat %{lib_name_orig}-pkg3.3.lang >> %{name}.lang
rm -f %{lib_name_orig}-pkg3.3.lang


%triggerun -- apt < 0.5.4
# Convert options from 0.3.X to 0.5.X
CONF=/etc/apt/apt.conf
if [ -f $CONF ]; then
   mv -f $CONF $CONF.rpmold
   sed -e 's/HoldPkgs/Hold/' \
       -e 's/AllowedDupPkgs/Allow-Duplicated/' \
       -e 's/IgnorePkgs/Ignore/' \
       -e 's/PostInstall/Post-Install/' \
       -e 's/.*Methods .*//' \
       $CONF.rpmold > $CONF
   if [ $? -ne 0 ]; then
      mv -f $CONF.rpmold $CONF
      echo "warning: couldn't convert old apt options"
   else
      echo "warning: original apt.conf saved as apt.conf.rpmold" 2>&1
   fi
fi

%triggerun -- apt > 0.5.4, apt < 0.5.4cnc4-1cl
# Fix bug in the trigger of first snapshot versions
CONF=/etc/apt/apt.conf
if [ -f $CONF ]; then
   mv $CONF $CONF.rpmtmp.$$
   sed -e 's/Holds/Hold/' \
       $CONF.rpmtmp.$$ > $CONF
   if [ $? -ne 0 ]; then
      mv -f $CONF.rpmtmp.$$ $CONF
   else
      rm -f $CONF.rpmtmp.$$
   fi
fi

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING* doc/*.txt doc/examples AUTHORS* README.Mageia
%{_bindir}/*
%{_mandir}/man5/*
%{_mandir}/man8/*

#files pbo
#{_sbindir}/apt-pbo

%files common
%{_libdir}/%{name}
/var/cache/%{name}
/var/lib/%{name}
%{_datadir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/apt/apt.conf 
%config(noreplace) %{_sysconfdir}/apt/sources.list
%config(noreplace) %{_sysconfdir}/apt/vendors.list
%config(noreplace) %{_sysconfdir}/apt/rpmpriorities
%dir %{_sysconfdir}/apt/apt.conf.d
%config(noreplace) %{_sysconfdir}/apt/apt.conf.d/mageia.conf
%config(noreplace) %{_sysconfdir}/apt/apt.conf.d/multilib.conf
%config(noreplace) %{_sysconfdir}/apt/apt.conf.d/01-suggests.conf
%dir %{_sysconfdir}/apt/translate.list.d

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{libnamedevel}
%defattr(-,root,root)
%{_includedir}/apt-pkg
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/pkgconfig/*.pc





%changelog

* Sat Jan 26 2013 cjw <cjw> 1:0.5.15lorg3.94-9.mga3
+ Revision: 392476
- patch31: fix for broken rpmlib in mageia 3

* Mon Jan 21 2013 malo <malo> 1:0.5.15lorg3.94-8.mga3
+ Revision: 390336
- updated RPM group

* Fri Jan 11 2013 umeabot <umeabot> 1:0.5.15lorg3.94-7.mga3
+ Revision: 345968
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Dec 18 2012 tv <tv> 1:0.5.15lorg3.94-6.mga3
+ Revision: 332288
- rebuild for new rpm

* Tue Dec 11 2012 cjw <cjw> 1:0.5.15lorg3.94-5.mga3
+ Revision: 329708
- patch30: fix build with glibc 2.16

* Sun Jun 10 2012 tv <tv> 1:0.5.15lorg3.94-4.mga3
+ Revision: 259391
- build with lua5.1-devel not lua-5.2
- rebuild for new rpm-4.10.0

* Sun Feb 05 2012 cjw <cjw> 1:0.5.15lorg3.94-3.mga2
+ Revision: 205053
- remove useless post sections
- fix building with rpm 4.9

  + dmorgan <dmorgan>
    - Rebuild against rpm 4.9.1.2

  + tv <tv>
    - add source URL

* Thu Apr 21 2011 cjw <cjw> 1:0.5.15lorg3.94-2.mga1
+ Revision: 89321
- better indentation in specfile
- drop buildroot definition
- drop old obsoletes and provides
- imported package apt