%define		version	1.20
%define		release	1%{?_dist_release}
%define		rel	1

Summary: Canon Printer Driver Common Module
Summary(ja): キヤノンプリンタドライバ共通モジュール
Name: cndrvcups-common
Version: %{version}
Release: %{release}
License: See the README file.
# Copyright: Copyright CANON INC. 2004. All Rights Reserved.
Group: System Environment/Libraries
Source: http://download.canon.jp/pub/driver/lasershot/linux/%{name}-%{version}-%{rel}.tar.gz
Patch0: cndrvcups-common-1.20-cngplpmod.patch
Patch1: cndrvcups-common-1.20-ppdoptions.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: cups, gtk+
Requires: ghostscript >= 7.07-0vl18
BuildRequires: cups-devel, gtk+-devel

%description
cndrvcups-common is common modules for Canon LIPS4/CAPT driver on CUPS.
You shouold install this module to use following specific drivers.

- LIPS4 Driver cndrvcups-lips4
- CAPT Driver cndrvcups-capt

%description -l ja
cndrvcups-common は CUPS (Common Unix Printing System) でキヤノン
製レーザープリンタを利用するための共通モジュールです。以下のドライバ
のどちらかを利用するために必要となります。

- LIPS4 ドライバ cndrvcups-lips4
- CAPT ドライバ cndrvcups-capt

%prep
%setup
%patch0 -p1 -b .cngplpmod
%patch1 -p1 -b .ppdoptions

%build
pushd buftool
  ./autogen.sh
  %configure --disable-shared --enable-static
popd

pushd cpca
  ./autogen.sh
  %configure --enable-shared --disable-static
popd

pushd cngplp
  ./autogen.sh
  %configure
popd

make


%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

mkdir -p %{buildroot}
mkdir -p %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}
%makeinstall

install -c libs/cnpkmodule ${RPM_BUILD_ROOT}%{_bindir}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(0644, root, root)
%{_bindir}/*
%{_libdir}/*
%{_includedir}/*
%{_datadir}/locale/*/LC_MESSAGES/*

%changelog
* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.20-1vl5
- applied new versioning policy, spec in utf-8

* Sun Nov 25 2007 Shu KONNO <owa@bg.wakwak.com> 1.20-1vl2
- added Patch0: cndrvcups-common-1.20-cngplpmod.patch
- added Patch1: cndrvcups-common-1.20-ppdoptions.patch

* Tue Sep  6 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.20-1vl1
- new upstream release

* Tue Oct 26 2004 Satoshi MACHINO <machino@vinelinux.org> 1.02-1vl1
- updated to 1.02-1

* Wed Aug 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.00-1vl1
- initial build for Vine Linux
