samsung-unified-driver/samsung-unified-driver.spec

148 lines
5.1 KiB
RPMSpec

Name: samsung-unified-driver
Version: 4.01.17
Release: 1mamba
Summary: Samsung Unified Linux Driver
Group: System/Spooling
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.bchemnet.com/suldr/
Source: http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-%{version}.tar.gz
Source1: samsung-unified-printer-98_smfp_autoconf_samsung.rules
Source2: samsung-unified-printer-99_smfp_autoconf_samsung.rules
License: Distributable
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcups-devel
BuildRequires: libgcc
BuildRequires: libqt4-devel
BuildRequires: libsane-backends-devel
BuildRequires: libstdc++6-devel
BuildRequires: libtiff-devel
BuildRequires: libusb-compat-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libxml2-devel
## AUTOBUILDREQ-END
Provides: samsung-mfp
Obsoletes: samsung-mfp
Requires: cups
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Samsung Unified Linux Driver.
%prep
%setup -q -c
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{_datadir}/%{name}
cp -a cdroot/Linux/noarch/at_root/* %{buildroot}/
install -d %{buildroot}%{_datadir}/cups/model/samsung/cms
cp -a cdroot/Linux/noarch/at_opt/share/ppd/cms/* %{buildroot}%{_datadir}/cups/model/samsung/cms/
cp -a cdroot/Linux/noarch/at_opt/share/ppd/*.ppd %{buildroot}%{_datadir}/cups/model/
find %{buildroot}%{_datadir}/cups/model/ -name "*.ppd" | xargs gzip -9
cp -a cdroot/Linux/noarch/at_opt/share/locale %{buildroot}%{_datadir}
cp -a cdroot/Linux/noarch/at_opt/share/{doc,help,help-fr,images,utils} %{buildroot}%{_datadir}/%{name}/
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/udev/rules.d/98_smfpautoconf.rules
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/udev/rules.d/99_smfpautoconf.rules
%ifarch x86_64
cd cdroot/Linux/x86_64
%else
cd cdroot/Linux/i386
%endif
cp -a at_root/* %{buildroot}/
cp -a at_opt/* %{buildroot}%{_prefix}
ln -s libmfp.so.1.0.1 %{buildroot}%{_libdir}/libmfp.so.1
ln -s libmfp.so.1.0.1 %{buildroot}%{_libdir}/libmfp.so
ln -s libsane-smfp.1.0.1 %{buildroot}%{_libdir}/sane/libsane-smfp.so.1
ln -s libsane-smfp.so.1 %{buildroot}%{_libdir}/sane/libsane-smfp.so
install -d %{buildroot}%{_sysconfdir}/sane.d/dll.d
echo "smfp" >> %{buildroot}%{_sysconfdir}/sane.d/dll.d/smfp
chmod 644 %{buildroot}%{_sysconfdir}/sane.d/dll.d/smfp
install -d %{buildroot}%{_libdir}/cups/{backend,filter}
cp pstosecps pstospl pstosplc rastertospl rastertosplc %{buildroot}%{_libdir}/cups/filter/
cp mfp %{buildroot}%{_libdir}/cups/backend/
install -m0755 libscmssc.so %{buildroot}/opt/smfp-common/lib/
install -d %{buildroot}/opt/Samsung/mfp/{bin,share/images}
cp -a qt4/at_opt/bin/* %{buildroot}/opt/Samsung/mfp/bin
cp -a qt4/at_opt/plugins %{buildroot}/opt/Samsung/mfp/
cd ../../..
install -m644 cdroot/Linux/OEM.ini %{buildroot}/opt/Samsung/mfp/share/OEM.ini
install -D -m755 cdroot/Linux/noarch/smfpd.sh %{buildroot}%{_initrddir}/smfpd
# samsung configurator desktop entries
sed -i "s|\$VENDOR|Samsung|" cdroot/Linux/noarch/desktop/*.in
cat >> cdroot/Linux/noarch/desktop/configurator.desktop.in << _EOF
Categories=System;Settings;HardwareSettings;Printing;
_EOF
install -D -m0644 cdroot/Linux/noarch/desktop/configurator.desktop.in \
%{buildroot}%{_datadir}/applications/Samsung-Configurator.desktop
install -D -m0644 cdroot/Linux/noarch/at_opt/share/images/Configurator.png \
%{buildroot}/opt/Samsung/mfp/share/images/Configurator.png
rm -rf %{buildroot}/usr/uninstall
rm -f %{buildroot}/usr/bin/gettext
rm -f %{buildroot}%{_datadir}/locale/fr/LC_MESSAGES/install.mo
%find_lang sane-smfp
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f sane-smfp.lang
%defattr(-,root,root)
%{_initrddir}/smfpd
%{_sysconfdir}/sane.d/dll.d/smfp
%{_sysconfdir}/udev/rules.d/98_smfpautoconf.rules
%{_sysconfdir}/udev/rules.d/99_smfpautoconf.rules
%{_sysconfdir}/sane.d/smfp.conf
%{_sbindir}/smfpd
%{_bindir}/netdiscovery
%{_libdir}/cups/backend/mfp
%{_libdir}/cups/filter/pstosecps
%{_libdir}/cups/filter/pstospl
%{_libdir}/cups/filter/pstosplc
%{_libdir}/cups/filter/rastertospl
%{_libdir}/cups/filter/rastertosplc
%{_libdir}/libmfp.so*
%{_libdir}/sane/libsane-smfp.so*
%{_datadir}/cups/model/*.ppd*
%dir %{_datadir}/cups/model/samsung
%{_datadir}/cups/model/samsung/cms/*.cts
#%{_datadir}/ppd/cms/*.cts
%dir %{_datadir}/samsung-unified-driver
%{_datadir}/samsung-unified-driver/*
%{_datadir}/applications/Samsung-Configurator.desktop
/opt/smfp-common/lib/libnetsnmp.so.10.0.2
/opt/smfp-common/lib/libscmssc.so
/opt/smfp-common/printer/.version
%dir /opt/Samsung/mfp/
%dir /opt/Samsung/mfp/bin
/opt/Samsung/mfp/bin/*
%dir /opt/Samsung/mfp/plugins
/opt/Samsung/mfp/plugins/*
%dir /opt/Samsung/mfp/share
/opt/Samsung/mfp/share/OEM.ini
%dir /opt/Samsung/mfp/share/images
/opt/Samsung/mfp/share/images/Configurator.png
%doc cdroot/Linux/noarch/eula/eula.htm
%doc cdroot/Linux/noarch/eula/eula-fr.htm
%changelog
* Mon Jun 24 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.01.17-1mamba
- package created by silvan using the webbuild interface