File photocd.spec of Package photocd

#
# spec file for package photocd
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           photocd
BuildRequires:  libnetpbm-devel libpcd2-devel libtiff-devel tcsh update-desktop-files xorg-x11-devel
License:        GPL v2 or later
Group:          Productivity/Graphics/Convertors
Provides:       xpcd02
Requires:       xv
Version:        1.12
Release:        1
Summary:        An image converter
URL:            http://bytesex.org/xpcd.html
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
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.



Authors:
--------
    Gerd Knorr <kraxel@cs.tu-berlin.de>
    Hadmut Danisch <danisch@ira.uka.de>

%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="$RPM_OPT_FLAGS -Wall"
%configure \
	--prefix=%{_prefix} \
	--x-includes=%{_includedir} \
	--with-gimp=no \
	--with-svga \
	--with-jpeg \
	--with-tiff
make
cd ..
make CFLAGS="$RPM_OPT_FLAGS -Wall"

%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man1,de/man1}
install -m 755 photocd $RPM_BUILD_ROOT%{_bindir}
install -m 644 photocd.1 $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 photocd.1.gr $RPM_BUILD_ROOT%{_mandir}/de/man1/photocd.1
cd xpcd-2.09
make install \
	DESTDIR=$RPM_BUILD_ROOT \
	mandir=$RPM_BUILD_ROOT%{_mandir} \
	x11_libdir=$RPM_BUILD_ROOT/usr/share/X11
mkdir xpcd-2.09
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/pcdview.1
%suse_update_desktop_file -i xpcd AudioVideo CD
echo $RPM_BUILD_ROOT/usr/lib/X11/app-defaults

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc README README.gr xpcd-2.09/xpcd-2.09
%dir %{_datadir}/X11/xpcd
%config %{_datadir}/X11/xpcd/system.xpcdrc
%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