Name:           polkit-kde
Summary:        PolicyKit integration for KDE Desktop
Summary(ja):    PolicyKit の KDE デスクトップ統合
Version:        0.99.0
Release:        3%{?_dist_release}

Group:          System Environment/Daemons
License:        GPLv2+
URL:            http://www.kde.org/

Source0:        ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/polkit-kde-agent-1-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  kdelibs4-devel
BuildRequires:  polkit-qt-devel >= 0.99.0
BuildRequires:  cmake
BuildRequires:  gettext

Provides: PolicyKit-authentication-agent
Provides: polkit-kde-1 = %{version}-%{release}

Obsoletes: PolicyKit-kde < 4.5

%description
Provides Policy Kit Authentication Agent that nicely fits to KDE.

%prep
%setup -q -n polkit-kde-agent-1-%{version}

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIB_INSTALL_DIR:PATH=%{_libdir} \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd

make %{?_smp_mflags}  -C %{_target_platform} VERBOSE=1


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}

#desktop-file-install --delete-original \
#  --dir %{buildroot}%{_sysconfdir}/xdg/autostart \
#  %{buildroot}%{_sysconfdir}/xdg/autostart/polkit-kde-authentication-agent-1.desktop

%find_lang polkit-kde-authentication-agent-1

%clean
rm -rf %{buildroot}


%files -f polkit-kde-authentication-agent-1.lang
%defattr(-,root,root,-)
%doc COPYING
%{_libexecdir}/kde4/polkit-kde-authentication-agent-1
%{_datadir}/autostart/polkit-kde-authentication-agent-1.desktop
%{_datadir}/kde4/apps/policykit1-kde/policykit1-kde.notifyrc


%changelog
* Fri Sep 02 2016 Toshiaki Ara <ara_t@384.jp> - 0.99.0-3
- rebuild with gcc-5.4.0

* Sun Nov 14 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.99.0-2
- rebuilt on current VineSeed

* Sun Feb  6 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.99.0-1
- new upstream release

* Sun Feb 28 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.95.1-5
- initial build for Vine Linux

* Sun Feb 14 2010 Rex Dieter <rdieter@fedoraproject.org> - 0.95.1-4
- FTBFS polkit-kde-0.95.1-3.fc13: ImplicitDSOLinking (#564809)

* Wed Jan 06 2010 Jaroslav Reznik <jreznik@redhat.com> - 0.95.1-3
- Again provides PolicyKit-authentication-agent

* Tue Jan 05 2010 Jaroslav Reznik <jreznik@redhat.com> - 0.95.1-2
- Added Gettext BR

* Tue Jan 05 2010 Jaroslav Reznik <jreznik@redhat.com> - 0.95.1-1
- Update to official release
- Provides polkit-kde-1

* Mon Nov 30 2009 Jaroslav Reznik <jreznik@redhat.com> - 0.95-0.2.20091125svn
- Adds desktop file
- Adds obsoletes

* Wed Nov 25 2009 Jaroslav Reznik <jreznik@redhat.com> - 0.95-0.1.20091125svn
- Initial package
