File photocd.spec of Package photocd

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           photocd
Version:        1.12
Release:        1
License:        GPLv2+
Summary:        An image converter
Url:            http://bytesex.org/xpcd.html
Group:          Productivity/Graphics/Convertors
Source0:        photocd-1.12.tar.gz
Source1:        xpcd-2.09.tar.bz2
Source2:        xpcd.desktop
Patch0:         photocd-1.12-ia64.diff
Patch1:         xpcd-2.09-makefile.patch
Patch2:         xpcd-2.09-alias.patch
Patch3:         xpcd-2.09-gcc4.patch
Patch4:         xpcd-2.09-64arch.patch
Patch5:         xpcd-2.09-libpcd-dir.patch
BuildRequires:  libnetpbm-devel
BuildRequires:  libpcd-devel
BuildRequires:  libtiff-devel
BuildRequires:  tcsh
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
BuildRequires:  automake autoconf
Requires:       xv
Provides:       xpcd02
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package includes an X11 interface and programs for converting
Photo CD images into TARGA or BITMAP (Windows 3.1) format.
Documentation can be found in /usr/share/doc/misc/photocd.doc.
Additionally included is the program "hpcdtoppm" that converts Photo CD
images to the PPM format.

%prep
%setup -a 1 -q
%patch0
cd xpcd-2.09
%patch1
%patch2
%patch3
%patch4
%patch5 -p1

%build
cd xpcd-2.09
autoreconf --force --install
CFLAGS="%{optflags} -Wall"
%configure \
	--prefix=%{_prefix} \
	--x-includes=%{_includedir} \
	--with-gimp=no \
	--with-svga \
	--with-jpeg \
	--with-tiff
make
cd ..
make CFLAGS="%{optflags} -Wall"

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/{man1,de/man1}
install -m 755 photocd %{buildroot}%{_bindir}
install -m 644 photocd.1 %{buildroot}%{_mandir}/man1
install -m 644 photocd.1.gr %{buildroot}%{_mandir}/de/man1/photocd.1
cd xpcd-2.09
make install \
	DESTDIR=%{buildroot} \
	mandir=%{buildroot}%{_mandir} \
	x11_libdir=%{buildroot}%{_datadir}/X11
mkdir xpcd-2.09
rm -f %{buildroot}%{_mandir}/man1/pcdview.1
%suse_update_desktop_file -i xpcd AudioVideo CD

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README README.gr xpcd-2.09/xpcd-2.09
%dir %{_datadir}/X11/xpcd
%config %{_datadir}/X11/xpcd/system.xpcdrc
%dir /usr/share/X11/app-defaults
%config %{_datadir}/X11/app-defaults/Xpcd-2
%config %{_datadir}/X11/de/app-defaults/Xpcd-2
%config %{_datadir}/X11/da/app-defaults/Xpcd-2
%doc %{_mandir}/man1/xpcd.1.gz
%doc %{_mandir}/man1/photocd.1.gz
%doc %{_mandir}/man1/pcdtoppm.1.gz
%doc %{_mandir}/de/man1/photocd.1.gz
%{_bindir}/pcdtoppm
%{_bindir}/photocd
%{_bindir}/xpcd
%{_datadir}/applications/*.desktop
%dir %{_datadir}/X11/de
%dir %{_datadir}/X11/de/app-defaults
%dir %{_datadir}/X11/da
%dir %{_datadir}/X11/da/app-defaults
%{_includedir}/X11/pixmaps

%changelog
openSUSE Build Service is sponsored by