2007-01-10 17:50:00 +01:00
|
|
|
#
|
2009-08-28 20:24:17 +02:00
|
|
|
# spec file for package libzypp (Version 6.13.2)
|
2007-01-10 17:50:00 +01:00
|
|
|
#
|
2009-08-28 20:24:17 +02:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-10 17:50:00 +01:00
|
|
|
#
|
2009-08-28 20:24:17 +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.
|
|
|
|
|
2007-01-10 17:50:00 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2009-08-28 20:24:17 +02:00
|
|
|
|
2007-01-10 17:50:00 +01:00
|
|
|
Name: libzypp
|
2007-07-05 11:06:50 +02:00
|
|
|
License: GPL v2 or later
|
2007-01-10 17:50:00 +01:00
|
|
|
Group: System/Packages
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2009-08-28 20:24:17 +02:00
|
|
|
AutoReqProv: on
|
2007-01-10 17:50:00 +01:00
|
|
|
Summary: Package, Patch, Pattern, and Product Management
|
2009-08-28 20:24:17 +02:00
|
|
|
Version: 6.13.2
|
|
|
|
Release: 1
|
2009-07-11 17:26:42 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: %{name}-rpmlintrc
|
2007-01-10 17:50:00 +01:00
|
|
|
Prefix: /usr
|
2007-04-20 01:16:38 +02:00
|
|
|
Provides: yast2-packagemanager
|
2007-01-10 17:50:00 +01:00
|
|
|
Obsoletes: yast2-packagemanager
|
2008-10-24 15:19:57 +02:00
|
|
|
Recommends: logrotate
|
2007-03-01 22:15:26 +01:00
|
|
|
BuildRequires: cmake
|
2009-08-28 20:24:17 +02:00
|
|
|
BuildRequires: libsatsolver-devel >= 0.14.5
|
2009-07-16 16:54:21 +02:00
|
|
|
BuildRequires: openssl-devel
|
2008-03-14 18:05:48 +01:00
|
|
|
BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel
|
2009-02-23 23:24:01 +01:00
|
|
|
# required for testsuite, webrick
|
|
|
|
BuildRequires: ruby
|
2009-08-28 20:24:17 +02:00
|
|
|
BuildRequires: aria2 >= 1.1.2
|
2008-02-26 11:52:16 +01:00
|
|
|
%if 0%{?suse_version}
|
2008-11-23 09:10:54 +01:00
|
|
|
BuildRequires: libexpat-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: expat-devel
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
2009-08-28 20:24:17 +02:00
|
|
|
BuildRequires: hicolor-icon-theme rpm-devel update-desktop-files
|
|
|
|
Requires: uuid-runtime
|
2008-03-14 18:05:48 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version}
|
2009-08-28 20:24:17 +02:00
|
|
|
BuildRequires: dbus-glib-devel glib2-devel popt-devel rpm-devel
|
2008-02-26 11:52:16 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?mandriva_version}
|
2008-03-14 18:05:48 +01:00
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: librpm-devel
|
2008-08-14 00:29:18 +02:00
|
|
|
# uuidgen
|
2009-08-28 20:24:17 +02:00
|
|
|
Requires: e2fsprogs
|
2008-02-26 11:52:16 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
2007-06-21 22:40:55 +02:00
|
|
|
Requires: gpg2
|
2008-02-26 11:52:16 +01:00
|
|
|
%else
|
|
|
|
Requires: gnupg
|
|
|
|
%endif
|
2008-10-24 15:19:57 +02:00
|
|
|
%requires_eq satsolver-tools
|
2009-02-23 23:24:01 +01:00
|
|
|
Requires: aria2 >= 1.1.2
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Package, Patch, Pattern, and Product Management
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Andres <ma@suse.de>
|
|
|
|
Jiri Srain <jsrain@suse.cz>
|
|
|
|
Stefan Schubert <schubi@suse.de>
|
|
|
|
Duncan Mac-Vicar <dmacvicar@suse.de>
|
|
|
|
Klaus Kaempf <kkaempf@suse.de>
|
|
|
|
Marius Tomaschewski <mt@suse.de>
|
|
|
|
Stanislav Visnovsky <visnov@suse.cz>
|
|
|
|
Ladislav Slezak <lslezak@suse.cz>
|
|
|
|
|
|
|
|
%package devel
|
2009-08-28 20:24:17 +02:00
|
|
|
License: GPL v2 or later
|
2009-07-11 17:26:42 +02:00
|
|
|
Requires: libzypp == %{version}
|
2007-01-10 17:50:00 +01:00
|
|
|
Requires: libxml2-devel curl-devel openssl-devel rpm-devel glibc-devel zlib-devel
|
|
|
|
Requires: bzip2 popt-devel dbus-1-devel glib2-devel hal-devel boost-devel libstdc++-devel
|
2008-11-28 15:31:12 +01:00
|
|
|
Requires: cmake libsatsolver-devel >= 0.13.0
|
2007-01-10 17:50:00 +01:00
|
|
|
Summary: Package, Patch, Pattern, and Product Management - developers files
|
|
|
|
Group: System/Packages
|
|
|
|
Provides: yast2-packagemanager-devel
|
|
|
|
Obsoletes: yast2-packagemanager-devel
|
|
|
|
|
|
|
|
%description -n libzypp-devel
|
|
|
|
Package, Patch, Pattern, and Product Management - developers files
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Michael Andres <ma@suse.de>
|
|
|
|
Jiri Srain <jsrain@suse.cz>
|
|
|
|
Stefan Schubert <schubi@suse.de>
|
|
|
|
Duncan Mac-Vicar <dmacvicar@suse.de>
|
|
|
|
Klaus Kaempf <kkaempf@suse.de>
|
|
|
|
Marius Tomaschewski <mt@suse.de>
|
|
|
|
Stanislav Visnovsky <visnov@suse.cz>
|
|
|
|
Ladislav Slezak <lslezak@suse.cz>
|
|
|
|
|
|
|
|
%prep
|
2007-03-01 22:15:26 +01:00
|
|
|
%setup -q
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%build
|
2007-03-01 22:15:26 +01:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2008-05-28 17:00:23 +02:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export CXXFLAGS="$CFLAGS"
|
2007-04-04 20:54:31 +02:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
|
2008-03-14 18:05:48 +01:00
|
|
|
-DDOC_INSTALL_DIR=%{_docdir} \
|
2007-04-04 20:54:31 +02:00
|
|
|
-DLIB=%{_lib} \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_SKIP_RPATH=1 \
|
|
|
|
..
|
2007-09-03 23:18:21 +02:00
|
|
|
make %{?jobs:-j %jobs} VERBOSE=1
|
2007-03-01 22:15:26 +01:00
|
|
|
make -C doc/autodoc %{?jobs:-j %jobs}
|
|
|
|
make -C po %{?jobs:-j %jobs} translations
|
2009-02-27 16:14:30 +01:00
|
|
|
%if 0%{?run_testsuite}
|
|
|
|
make -C tests %{?jobs:-j %jobs}
|
|
|
|
pushd tests
|
2009-03-07 11:42:29 +01:00
|
|
|
LD_LIBRARY_PATH=$PWD/../zypp:$LD_LIBRARY_PATH ctest .
|
2009-02-27 16:14:30 +01:00
|
|
|
popd
|
|
|
|
%endif
|
2007-01-10 17:50:00 +01:00
|
|
|
#make check
|
|
|
|
|
|
|
|
%install
|
2008-03-14 18:05:48 +01:00
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
2007-03-01 22:15:26 +01:00
|
|
|
cd build
|
2007-01-10 17:50:00 +01:00
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
2007-03-01 22:15:26 +01:00
|
|
|
make -C doc/autodoc install DESTDIR=$RPM_BUILD_ROOT
|
2007-09-11 00:44:02 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/zypp/repos.d
|
2008-07-01 14:29:25 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/zypp/services.d
|
2009-08-28 20:24:17 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_usr}/lib/zypp
|
2008-09-25 13:18:59 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_var}/lib/zypp
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_var}/log/zypp
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_var}/cache/zypp
|
2008-03-14 18:05:48 +01:00
|
|
|
%if 0%{?suse_version}
|
2007-01-10 17:50:00 +01:00
|
|
|
%suse_update_desktop_file -G "" -C "" package-manager
|
2008-03-14 18:05:48 +01:00
|
|
|
%endif
|
2007-03-01 22:15:26 +01:00
|
|
|
make -C po install DESTDIR=$RPM_BUILD_ROOT
|
2007-09-11 00:44:02 +02:00
|
|
|
# Create filelist with translations
|
2007-03-01 22:15:26 +01:00
|
|
|
cd ..
|
2007-01-10 17:50:00 +01:00
|
|
|
%{find_lang} zypp
|
|
|
|
|
|
|
|
%post
|
2008-10-24 15:19:57 +02:00
|
|
|
%run_ldconfig
|
2008-02-26 11:52:16 +01:00
|
|
|
if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
|
2008-05-26 19:04:04 +02:00
|
|
|
# convert old lock file to new
|
|
|
|
# TODO make this a separate file?
|
|
|
|
# TODO run the sript only when updating form pre-11.0 libzypp versions
|
|
|
|
LOCKSFILE=/etc/zypp/locks
|
|
|
|
OLDLOCKSFILE=/etc/zypp/locks.old
|
|
|
|
is_old(){
|
2008-12-07 21:57:57 +01:00
|
|
|
# if no such file, exit with false (1 in bash)
|
|
|
|
test -f ${LOCKSFILE} || return 1
|
2008-05-26 19:04:04 +02:00
|
|
|
TEMP_FILE=`mktemp`
|
|
|
|
cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
|
|
|
|
if [ -s ${TEMP_FILE} ]
|
|
|
|
then
|
|
|
|
RES=0
|
|
|
|
else
|
|
|
|
RES=1
|
|
|
|
fi
|
|
|
|
rm -f ${TEMP_FILE}
|
|
|
|
return ${RES}
|
|
|
|
}
|
|
|
|
append_new_lock(){
|
|
|
|
case "$#" in
|
|
|
|
1 )
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
2 ) #TODO version
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
version: $2
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
3 ) #TODO version
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
version: $2 $3
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
die() {
|
|
|
|
echo $1
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
if is_old ${LOCKSFILE}
|
|
|
|
then
|
|
|
|
mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
|
|
|
|
cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
|
|
|
|
do
|
|
|
|
append_new_lock $line
|
|
|
|
done
|
|
|
|
fi
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%postun
|
2008-10-24 15:19:57 +02:00
|
|
|
%run_ldconfig
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%clean
|
2008-03-14 18:05:48 +01:00
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%files -f zypp.lang
|
|
|
|
%defattr(-,root,root)
|
2007-09-11 00:44:02 +02:00
|
|
|
%dir /etc/zypp
|
|
|
|
%dir /etc/zypp/repos.d
|
2008-11-08 00:24:07 +01:00
|
|
|
%dir /etc/zypp/services.d
|
2007-09-11 00:44:02 +02:00
|
|
|
%config(noreplace) /etc/zypp/zypp.conf
|
2008-07-17 22:44:26 +02:00
|
|
|
%config(noreplace) /etc/zypp/systemCheck
|
2008-10-24 15:19:57 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr
|
2008-09-25 13:18:59 +02:00
|
|
|
%dir %{_var}/lib/zypp
|
|
|
|
%dir %{_var}/log/zypp
|
|
|
|
%dir %{_var}/cache/zypp
|
2009-08-28 20:24:17 +02:00
|
|
|
%dir %{prefix}/lib/zypp
|
2007-04-04 20:54:31 +02:00
|
|
|
%{prefix}/share/zypp
|
2007-01-10 17:50:00 +01:00
|
|
|
%{prefix}/share/applications/package-manager.desktop
|
2007-11-14 12:17:57 +01:00
|
|
|
%{prefix}/share/icons/hicolor/scalable/apps/package-manager-icon.svg
|
|
|
|
%{prefix}/share/icons/hicolor/16x16/apps/package-manager-icon.png
|
2008-07-17 22:44:26 +02:00
|
|
|
%{prefix}/share/icons/hicolor/22x22/apps/package-manager-icon.png
|
|
|
|
%{prefix}/share/icons/hicolor/24x24/apps/package-manager-icon.png
|
2007-11-14 12:17:57 +01:00
|
|
|
%{prefix}/share/icons/hicolor/32x32/apps/package-manager-icon.png
|
|
|
|
%{prefix}/share/icons/hicolor/48x48/apps/package-manager-icon.png
|
2009-08-28 20:24:17 +02:00
|
|
|
%{prefix}/bin/*
|
2007-09-11 00:44:02 +02:00
|
|
|
%{_libdir}/libzypp*so.*
|
2008-05-11 16:53:18 +02:00
|
|
|
%doc %_mandir/man5/locks.5.*
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2007-03-01 22:15:26 +01:00
|
|
|
%{_libdir}/libzypp.so
|
|
|
|
%{_docdir}/%{name}
|
2008-09-25 13:18:59 +02:00
|
|
|
%{prefix}/include/zypp
|
2008-02-16 08:15:41 +01:00
|
|
|
%{prefix}/share/cmake/Modules/*
|
2007-01-10 17:50:00 +01:00
|
|
|
%{_libdir}/pkgconfig/libzypp.pc
|
2007-12-02 15:09:03 +01:00
|
|
|
|
2007-02-27 13:42:36 +01:00
|
|
|
%changelog
|