File kreetingkard.spec of Package kreetingkard

# norootforbuild
%define templates_version 0.2.0
%define _prefix /opt/kde3
%define _sysconfdir /etc%{_prefix}

Name:			kreetingkard
Version:		0.7.1
Release:		0
Summary:		Tool for Making Greeting Cards
Source:			kreetingkard-%{version}.tar.gz
Source1:		kreetingkard_templates-%{templates_version}.tar.gz
Patch1:			kreetingkard-fix-warnings.diff
Patch2:			kreetingkard-kkaitem-purevirtual.diff
Patch3:			kreetingkard-0.7.1-fix-build-gcc411.patch
URL:			http://linux-life.net/program/cc/kde/app/kreetingkard/
Group:			Productivity/Publishing/Other
License:		GPL
BuildRoot:		%{_tmppath}/build-%{name}-%{version}
BuildRequires:		kdelibs3-devel libacl libacl-devel libjpeg-devel
BuildRequires:		autoconf automake libtool update-desktop-files

%description
KreetingKard is a tool for making greeting cards. It allows you to make
greeting cards easily by choosing a template and changing the words.

%prep
%setup -q -b 1
%patch1
%patch2
%patch3 -p1 -b .gcc41

%{?suse_update_libdir:%{suse_update_libdir}}

. /etc/opt/kde3/common_options
update_admin --no-unsermake
./configure $configkde

pushd "../kreetingkard_templates-%{templates_version}"
update_admin --no-unsermake
./configure $configkde
popd

%build
. /etc/opt/kde3/common_options
%__make
pushd "../kreetingkard_templates-%{templates_version}"
%__make
popd

%install
%makeinstall
pushd "../kreetingkard_templates-%{templates_version}"
%makeinstall
popd

mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/pixmaps
install -m 644 ./src/cr32-app-kreetingkard.png %{buildroot}%{_datadir}/pixmaps/kreetingkard.png

%suse_update_desktop_file -r "%{name}" Office Presentation

%find_lang "%{name}"

%clean
%__rm -rf "%{buildroot}"

%files -f "%{name}.lang"
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/kreetingkard
%{_datadir}/applications/kde/kreetingkard.desktop
%{_datadir}/pixmaps/kreetingkard.png
%dir %{_datadir}/apps/kreetingkard
%{_datadir}/apps/kreetingkard/splash.png
%{_datadir}/apps/kreetingkard/*.rc
%dir %{_datadir}/apps/kreetingkard/templates
%{_datadir}/apps/kreetingkard/templates/*
%{_datadir}/icons/*/*/*/*
%{_datadir}/mimelnk/application/x-kreetingkard.desktop

%changelog
* Wed Dec 28 2005 Pascal Bleser <guru@unixtech.be> 0.7.1-3
- new package