cnijfilter4/cnijfilter4.spec

233 lines
6.8 KiB
RPMSpec

%define name1 cnijfilter
%define _arc %(getconf LONG_BIT)
# available models: p200 mg2500 mg2400 mg3500 mg5500 mg6400 mg6500 mg7100
%define MODEL mg2500
%define MODEL_NUM 429
# mg7100 423
# mg6500 424
# mg6400 425
# mg5500 426
# mg3500 427
# mg2400 428
# mg2500 429
# p200 430
Name: cnijfilter4
Version: 4.00
Release: 1mamba
Summary: CUPS Printer Drivers for Canon printers
Group: System/Spooling
Vendor: openmamba
Distribution: openmamba
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
URL: http://support-au.canon.com.au/contents/AU/EN/0100411802.html
Source: http://gdlp01.c-wss.com/gds/5/0100005515/01/cnijfilter-source-%{version}-1.tar.gz
Patch0: cnijfilter4-4.00-ipp.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcap-devel
BuildRequires: libcups-devel
BuildRequires: liblzma-devel
BuildRequires: libpcre-devel
BuildRequires: libpopt-devel
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
IJ Printer Driver for Linux.
This IJ Printer Driver provides printing functions for Canon Inkjet printers operating under the CUPS (Common UNIX Printing System) environment.
%package %{MODEL}series
Summary: CUPS Printers Driver for Canon %{MODEL} printers
License: GPL
Group: System/Spooling
Requires: %{name}-common = %{version}-%{release}
%description %{MODEL}series
IJ Printer Driver for Linux.
This IJ Printer Driver provides printing functions for Canon Inkjet printers operating under the CUPS (Common UNIX Printing System) environment.
This package contains the CUPS Printers Driver for Canon %{MODEL} printers.
%package common
Summary: Common files used by CUPS Printers Driver for Canon printers
License: GPL
Group: System/Spooling
Requires: cups
Requires(post):udev
%description common
IJ Printer Driver for Linux.
This IJ Printer Driver provides printing functions for Canon Inkjet printers operating under the CUPS (Common UNIX Printing System) environment.
This package contains common files used by CUPS Printers Driver for Canon printers.
%prep
%setup -q -n %{name1}-source-%{version}-1
%patch0 -p1
%build
pushd ppd
./autogen.sh --prefix=/usr --program-suffix=%{MODEL}
make clean
make
popd
pushd cnijfilter
./autogen.sh --prefix=%{_prefix} --program-suffix=%{MODEL} --enable-libpath=%{_libdir}/bjlib --enable-binpath=%{_bindir}
make clean
make
popd
pushd libs
./autogen.sh --prefix=%{_prefix}
popd
pushd bscc2sts
./autogen.sh
popd
pushd cnijnpr
./autogen.sh --prefix=%{_prefix} --enable-libpath=%{_libdir}/bjlib
popd
pushd cngpij
./autogen.sh --prefix=%{_prefix} --enable-progpath=%{_bindir}
popd
pushd cngpijmnt
./autogen.sh --prefix=%{_prefix} --enable-progpath=%{_bindir}
popd
pushd pstocanonij
./autogen.sh --prefix=/usr --enable-progpath=%{_bindir}
popd
pushd backend
./autogen.sh --prefix=/usr
popd
pushd backendnet
./autogen.sh --prefix=%{_prefix} --enable-libpath=%{_libdir}/bjlib --enable-progpath=%{_bindir} LDFLAGS="-L../../com/libs_bin%{_arc}"
popd
pushd cmdtocanonij
./autogen.sh --prefix=/usr --datadir=%{_datadir}
popd
pushd cnijbe
./autogen.sh --prefix=/usr --enable-progpath=%{_bindir}
popd
pushd lgmon2
./autogen.sh --prefix=%{_prefix} --enable-libpath=%{_libdir}/bjlib --enable-progpath=%{_bindir} LDFLAGS="-L../../com/libs_bin%{_arc}"
popd
make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# make and install files for printer packages
pushd ppd
%makeinstall
popd
pushd cnijfilter
%makeinstall
popd
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bjlib
install -c -m 644 %{MODEL_NUM}/database/* ${RPM_BUILD_ROOT}%{_libdir}/bjlib
install -c -s -m 755 %{MODEL_NUM}/libs_bin%{_arc}/*.so.* ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_cupsbindir}/filter
mkdir -p ${RPM_BUILD_ROOT}%{_cupsbindir}/backend
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/cups/model
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d/
install -c -m 644 com/ini/cnnet.ini ${RPM_BUILD_ROOT}%{_libdir}/bjlib
make install DESTDIR=${RPM_BUILD_ROOT}
install -c -s -m 755 com/libs_bin%{_arc}/*.so.* ${RPM_BUILD_ROOT}%{_libdir}
install -c -m 644 etc/*.rules ${RPM_BUILD_ROOT}/etc/udev/rules.d/
install -c -m 755 ${RPM_BUILD_ROOT}%{_prefix}/lib/cups/filter/pstocanonij ${RPM_BUILD_ROOT}%{_cupsbindir}/filter/pstocanonij
install -c -m 755 ${RPM_BUILD_ROOT}%{_prefix}/lib/cups/backend/cnijusb ${RPM_BUILD_ROOT}%{_cupsbindir}/backend/cnijusb
install -c -m 755 ${RPM_BUILD_ROOT}%{_prefix}/lib/cups/backend/cnijnet ${RPM_BUILD_ROOT}%{_cupsbindir}/backend/cnijnet
install -c -m 755 ${RPM_BUILD_ROOT}%{_prefix}/lib/cups/filter/cmdtocanonij ${RPM_BUILD_ROOT}%{_cupsbindir}/filter/cmdtocanonij
install -c -m 755 ${RPM_BUILD_ROOT}%{_prefix}/lib/cups/backend/cnijbe ${RPM_BUILD_ROOT}%{_cupsbindir}/backend/cnijbe
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post %{MODEL}series
/sbin/ldconfig
:
%postun %{MODEL}series
/sbin/ldconfig
:
%post common
if [ $1 -ge 1 ]; then
/sbin/ldconfig
/sbin/udevadm control --reload-rules 2> /dev/null
/sbin/udevadm trigger --action=add --subsystem-match=usb 2> /dev/null
fi
:
%postun common
/sbin/ldconfig
:
%files %{MODEL}series
%defattr(-,root,root)
%{_bindir}/cif%{MODEL}
%{_bindir}/cnijlgmon2
%{_libdir}/libcnbp*%{MODEL_NUM}.so*
%{_libdir}/bjlib/cif%{MODEL}.conf
%{_libdir}/bjlib/cnb_%{MODEL_NUM}0.tbl
%{_libdir}/bjlib/cnbpname%{MODEL_NUM}.tbl
%{_datadir}/cups/model/canon%{MODEL}.ppd
%files common
%defattr(-,root,root)
%{_sysconfdir}/udev/rules.d/*.rules
%{_prefix}/lib/cups/backend/cnijbe
%{_prefix}/lib/cups/backend/cnijnet
%{_prefix}/lib/cups/backend/cnijusb
%{_prefix}/lib/cups/filter/cmdtocanonij
%{_prefix}/lib/cups/filter/pstocanonij
%{_bindir}/cngpij
%{_bindir}/cnijnpr
%{_bindir}/cnijnetprn
%{_bindir}/cngpijmnt
%{_libdir}/libcnbpcnclapicom.so.4.0.0
%{_datadir}/cmdtocanonij/autoalign.utl
%{_datadir}/cmdtocanonij/cleaning.utl
%{_datadir}/cmdtocanonij/nozzlecheck.utl
%{_datadir}/cnijlgmon2/cnb_cnijlgmon2.res
%{_datadir}/locale/de/LC_MESSAGES/cnijlgmon2.mo
%{_datadir}/locale/fr/LC_MESSAGES/cnijlgmon2.mo
%{_datadir}/locale/ja/LC_MESSAGES/cnijlgmon2.mo
%{_datadir}/locale/zh/LC_MESSAGES/cnijlgmon2.mo
%{_libdir}/libcnnet.so*
%attr(644, lp, lp) %{_libdir}/bjlib/cnnet.ini
%changelog
* Tue Aug 29 2017 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 4.00-1mamba
- package created using the webbuild interface