File krb5-ticket-watcher.spec of Package krb5-ticket-watcher

#
# spec file for package krb5-ticket-watcher
#
# Copyright (c) 2014 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/
#


Name:           krb5-ticket-watcher
Url:            http://sourceforge.net/projects/krb5ticketwatch
%if 0%{?suse_version}
BuildRequires:  cmake
BuildRequires:  krb5-devel
BuildRequires:  libqt4-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
%endif
%if 0%{?fedora_version}
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  krb5-devel
BuildRequires:  qt-devel
%endif
%if 0%{?mandriva_version}
%ifarch x86_64
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  lib64krb53-devel
BuildRequires:  lib64qt4-devel
%else
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libkrb53-devel
BuildRequires:  libqt4-devel
%endif
%endif
Summary:        A Tray Applet for Watching, Renewing, and Reinitializing Kerberos Tickets
License:        GPL-2.0+
Group:          System/GUI/Other
Version:        1.0.3
Release:        0
Source0:        %{name}-%{version}.tar.bz2
Source1:        krb5-ticket-watcher-po.tar.gz
Patch0:         krb5-ticket-watcher-gcc47.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A tray applet for watching, renewing, and reinitializing Kerberos
tickets.



Authors:
--------
    Michael Calmer <Michael.Calmer@gmx.de>

%if 0%{?suse_version}
%endif

%prep
%setup -n %{name}-%{version} 
%setup -a 1 -T -D -n %{name}-%{version}
%patch0 -p1
%if 0%{?suse_version}
# We skip createPot - it requires calling of "make" before, but
# supplementary scripts call only prep phase.
translation-update-upstream po krb5-ticket-watcher true
%endif

%build
%if 0%{?mandriva_version}
export PATH=/usr/lib/qt4/bin:${PATH}
%endif
mkdir build
cd build
export CFLAGS=$RPM_OPT_FLAGS
export CXXFLAGS="$CFLAGS"
cmake -DCMAKE_INSTALL_PREFIX=/usr .. 
make %{?jobs:-j %jobs} VERBOSE=1

%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version}
%suse_update_desktop_file %{name} System Network
%endif
cd ..
%{find_lang} krb5-ticket-watcher

%files -f krb5-ticket-watcher.lang
%defattr(-,root,root)
%doc COPYING Changes News TODO 
/usr/bin/*
/usr/share/applications/%{name}.desktop
/usr/share/pixmaps/*.png

%clean
rm -rf $RPM_BUILD_ROOT

%changelog