File zypper.spec of Package zypper

#
# spec file for package zypper (Version 1.0.14)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#

# norootforbuild


Name:           zypper
BuildRequires:  boost-devel >= 1.33.1 gettext-devel >= 0.15 libzypp-devel >= 5.30.12 readline-devel >= 5.1
BuildRequires:  cmake >= 2.4.6 gcc-c++ >= 4.1
Requires:       procps
%requires_ge	libzypp
Recommends:     logrotate cron
License:        GPL v2 or later
Group:          System/Packages
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
PreReq:         permissions
Summary:        Command Line Package Management Using Libzypp
Version:        1.0.14
Release:        0.<RELEASE1>
Source:         zypper-1.0.14.tar.bz2
Prefix:         /usr
Url:            http://en.opensuse.org/Zypper
Provides:       y2pmsh
Obsoletes:      y2pmsh

%description
Command Line Package Management Using Libzypp



Authors:
--------
    Jan Kupec <jkupec@suse.cz>
    Duncan Mac-Vicar <dmacvicar@suse.de>
    Martin Vidner <mvidner@suse.cz>

%prep
%setup -q

%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
      -DSYSCONFDIR=%{_sysconfdir} \
      -DMANDIR=%{_mandir} \
      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
      -DCMAKE_BUILD_TYPE=Release \
      ..

#gettextize -f
make %{?jobs:-j %jobs}
make -C po %{?jobs:-j %jobs} translations

%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT
make -C po install DESTDIR=$RPM_BUILD_ROOT

# Create filelist with translations
cd ..
%{find_lang} zypper
%{__install} -d -m755 %buildroot%_var/log
touch %buildroot%_var/log/zypper.log

%post
/sbin/ldconfig
%run_permissions

%verifyscript
%verify_permissions -e %{_sbindir}/zypp-refresh-wrapper

%postun -p /sbin/ldconfig

%clean

%files -f zypper.lang
%defattr(-,root,root)
%{_sysconfdir}/logrotate.d/zypper.lr
%{_sysconfdir}/logrotate.d/zypp-refresh.lr
%{_sysconfdir}/bash_completion.d/zypper.sh
%{_bindir}/zypper
%{_bindir}/installation_sources
%{_sbindir}/zypp-refresh
%verify(not mode) %attr (755,root,root) %{_sbindir}/zypp-refresh-wrapper
%dir %{prefix}/share/zypper
%dir %{prefix}/share/zypper/xml
%{prefix}/share/zypper/xml/xmlout.rnc
%dir %{prefix}/include/zypper
%{prefix}/include/zypper/prompt.h
%doc %{_mandir}/*/*
%doc %dir %{_datadir}/doc/packages/zypper
%doc %{_datadir}/doc/packages/zypper/TODO
%doc %{_datadir}/doc/packages/zypper/zypper-rug
%doc %{_datadir}/doc/packages/zypper/COPYING
%doc %{_datadir}/doc/packages/zypper/HACKING
# declare ownership of the log file but prevent
# it from being erased by rpm -e
%ghost %config(noreplace) %{_var}/log/zypper.log
%changelog
openSUSE Build Service is sponsored by