SebastianVahl/KDE4spectemplate

= Generic template =

Name: Version: Release:       1%{?dist} Summary:

Group: License: URL: Source0: BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: kdelibs4-devel >= 4 BuildRequires: kde-filesystem >= 4 BuildRequires: cmake BuildRequires:

%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} } Requires:

%description

%prep %setup -q

%build

mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake_kde4} .. popd

make %{?_smp_mflags} -C %{_target_platform}

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

%clean rm -rf %{buildroot}

%files %defattr(-,root,root,-) %doc

%changelog

= %files =

Some macros are substituted for KDE4:

= Icons =

If your package is installing some icons to %{_kde4_iconsdir} (and normally it does) you should add this lines to your spec file to update the icon cache properly:

Requires(post): xdg-utils Requires(postun): xdg-utils

...

%clean rm -rf %{buildroot}

%post xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :

%postun xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :

This example is for /usr/share/icons/hicolor. If there are addidional icons installed in additional icon sets (for example: /usr/share/icons/crystalsvg) you should add an additional line for these icon set.