2012-09-07 08:53:00 +02:00
|
|
|
#
|
|
|
|
# spec file for package dpkg
|
|
|
|
#
|
2016-03-25 10:50:39 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-09-07 08:53:00 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define admindir %{_localstatedir}/lib/rpm/
|
|
|
|
Name: dpkg
|
2016-09-07 14:46:37 +02:00
|
|
|
Version: 1.18.10
|
2012-09-07 08:53:00 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Debian package management system
|
|
|
|
License: GPL-2.0+
|
|
|
|
Group: System/Packages
|
|
|
|
Url: http://www.debian.org
|
|
|
|
Source0: http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}.tar.xz
|
|
|
|
Source3: sensible-editor
|
|
|
|
# PATCH-FIX-OPENSUSE replace debian with opensuse. replace macros. update-alternatives temp directories' path and name from dpkg* to rpm*.
|
2015-03-01 12:01:24 +01:00
|
|
|
Patch1: update-alternatives-suse.patch
|
2016-04-06 20:21:31 +02:00
|
|
|
# PATCH-FIX-SUSE: update if two alternatives have same priority bnc#969171
|
|
|
|
Patch7: 0001-In-case-of-equal-priority-rather-update.patch
|
2016-09-07 14:46:37 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2012-09-07 08:53:00 +02:00
|
|
|
BuildRequires: gcc-c++
|
2015-04-01 15:01:26 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2012-09-29 15:16:14 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2016-09-07 14:46:37 +02:00
|
|
|
BuildRequires: libtool
|
2012-09-07 08:53:00 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2015-04-01 15:01:26 +02:00
|
|
|
BuildRequires: update-alternatives
|
2012-09-07 08:53:00 +02:00
|
|
|
BuildRequires: xz
|
|
|
|
BuildRequires: zlib-devel
|
2013-03-27 09:32:15 +01:00
|
|
|
BuildRequires: perl(Date::Parse)
|
|
|
|
BuildRequires: perl(IO::String)
|
2012-09-07 08:53:00 +02:00
|
|
|
Requires: cpio
|
|
|
|
Requires: make
|
|
|
|
Requires: patch
|
2015-04-01 15:01:26 +02:00
|
|
|
Requires: perl = %{perl_version}
|
|
|
|
Requires: update-alternatives
|
|
|
|
Requires: perl(Date::Parse)
|
2016-05-31 13:48:28 +02:00
|
|
|
Requires(post): coreutils
|
2015-04-01 15:01:26 +02:00
|
|
|
Recommends: perl(File::FcntlLock)
|
2012-09-07 08:53:00 +02:00
|
|
|
Provides: deb = %{version}
|
|
|
|
Obsoletes: deb < %{version}
|
|
|
|
Provides: dpkg-dev = %{version}
|
|
|
|
Provides: dpkg-doc = %{version}
|
|
|
|
Provides: dselect = %{version}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains tools for working with Debian packages. It makes
|
|
|
|
it possible to create and extract Debian packages. If Alien is
|
|
|
|
installed, the packages can be converted to RPMs.
|
|
|
|
|
|
|
|
This package contains the following Debian packages: dpkg, dselect,
|
|
|
|
dpkg-doc, dpkg-dev.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for dpkg
|
|
|
|
Group: Development/Libraries/C and C++
|
2015-04-01 15:01:26 +02:00
|
|
|
Requires: %{name} = %{version}
|
2012-09-07 08:53:00 +02:00
|
|
|
Provides: deb-devel = %{version}
|
|
|
|
Obsoletes: deb-devel < %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Libraries and header files for dpkg.
|
|
|
|
|
2015-04-01 15:01:26 +02:00
|
|
|
%lang_package
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch1 -p1
|
2016-04-06 20:21:31 +02:00
|
|
|
%patch7 -p1
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
%build
|
2016-09-07 14:46:37 +02:00
|
|
|
autoreconf -fvi
|
2012-09-07 08:53:00 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export SELINUX_LIBS="-lselinux"
|
2015-04-01 15:01:26 +02:00
|
|
|
%configure \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--with-selinux \
|
|
|
|
--localstatedir=%{_localstatedir}/lib \
|
2015-03-01 12:01:24 +01:00
|
|
|
--with-admindir=%{_localstatedir}/lib/dpkg
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
# configure somehow does not detect architecture correctly in OBS (bnc#469337), so
|
|
|
|
# let's do an awful hack and fix it in config.h
|
|
|
|
# XXX: who knows if this works on s390? :)
|
|
|
|
|
|
|
|
%define debarch %{_arch}
|
|
|
|
%ifarch x86_64
|
|
|
|
%define debarch amd64
|
|
|
|
%endif
|
2016-09-07 14:46:37 +02:00
|
|
|
%ifarch %{ix86}
|
2012-09-07 08:53:00 +02:00
|
|
|
%define debarch i386
|
|
|
|
%endif
|
|
|
|
%ifarch ppc powerpc
|
|
|
|
%define debarch powerpc
|
|
|
|
%endif
|
|
|
|
%ifarch ppc64 powerpc64
|
|
|
|
%define debarch ppc64
|
|
|
|
%endif
|
|
|
|
sed -i 's/^#define ARCHITECTURE ""/#define ARCHITECTURE "%{debarch}"/' config.h
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2015-04-01 15:01:26 +02:00
|
|
|
make install DESTDIR=%{?buildroot}
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
# remove update-alternatives stuff (included in separate package)
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
rm -rf %{buildroot}%{_localstatedir}/lib/dpkg/alternatives
|
|
|
|
rm -rf %{buildroot}%{_bindir}/update-alternatives
|
|
|
|
rm -rf %{buildroot}%{_sbindir}/update-alternatives
|
|
|
|
rm -rf %{buildroot}%{_mandir}/man8/update-alternatives.8
|
|
|
|
rm -rf %{buildroot}%{_mandir}/*/man8/update-alternatives.8
|
|
|
|
|
|
|
|
# locales
|
2015-04-01 15:01:26 +02:00
|
|
|
%find_lang %{name}
|
|
|
|
%find_lang dselect
|
|
|
|
%find_lang dpkg-dev
|
2012-09-07 08:53:00 +02:00
|
|
|
cat dselect.lang dpkg-dev.lang >> %{name}.lang
|
|
|
|
|
|
|
|
# extras
|
|
|
|
install -m 755 %{SOURCE3} %{buildroot}%{_bindir}
|
|
|
|
|
2013-03-27 09:32:15 +01:00
|
|
|
%check
|
2015-04-01 15:01:26 +02:00
|
|
|
make %{?_smp_mflags} check
|
2013-03-27 09:32:15 +01:00
|
|
|
|
2012-09-07 08:53:00 +02:00
|
|
|
%post
|
|
|
|
cd %{_localstatedir}/lib/dpkg
|
|
|
|
for f in diversions statoverride status ; do
|
|
|
|
[ ! -f $f ] && touch $f
|
|
|
|
done
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
2015-04-01 15:01:26 +02:00
|
|
|
%defattr(-,root,root)
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc ABOUT-NLS AUTHORS COPYING doc/triggers.txt NEWS README* THANKS TODO debian/changelog
|
2016-09-07 14:46:37 +02:00
|
|
|
%{_mandir}/man*/*
|
2015-06-05 15:45:03 +02:00
|
|
|
%exclude %{_mandir}/man*/update-alternatives*
|
2012-09-07 08:53:00 +02:00
|
|
|
%dir %{_sysconfdir}/dpkg
|
|
|
|
%config(noreplace) %{_sysconfdir}/dpkg/*
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_libdir}/dpkg
|
|
|
|
%{_datadir}/dpkg
|
|
|
|
%{_localstatedir}/lib/dpkg
|
|
|
|
%{perl_vendorlib}/Dpkg
|
|
|
|
%{perl_vendorlib}/Dpkg.pm
|
2015-03-01 12:01:24 +01:00
|
|
|
%{perl_vendorlib}/Dselect
|
|
|
|
%{perl_vendorlib}/Dselect/Ftp.pm
|
2012-09-07 08:53:00 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libdpkg.a
|
2015-03-01 12:01:24 +01:00
|
|
|
%{_libdir}/libdpkg.la
|
2012-09-07 08:53:00 +02:00
|
|
|
%{_libdir}/pkgconfig/libdpkg.pc
|
|
|
|
%{_includedir}/dpkg
|
|
|
|
|
|
|
|
%changelog
|