Mageia Bugzilla – Attachment 4354 Details for
Bug 11235
Add new rpm install brother printer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Spec file
install-brother-printer.spec (text/x-rpm-spec), 2.45 KB, created by
Dimitrios Glentadakis
on 2013-09-15 15:15:53 CEST
(
hide
)
Description:
Spec file
Filename:
MIME Type:
Creator:
Dimitrios Glentadakis
Created:
2013-09-15 15:15:53 CEST
Size:
2.45 KB
patch
obsolete
>Name: install-brother-printer >Version: 0.1 >Release: %mkrel 2 >Summary: Tool to install Brother Printer drivers >Group: System/Printing >License: GPLv2 >URL: https://github.com/ozancaglayan/install-brother-printer-driver ># wget https://github.com/ozancaglayan/%%{name}-driver/archive/%%{version}.tar.gz -O %%{name}-%%{version}.tar.gz >Source0: %{name}-%{version}.tar.gz >Source1: brother.png >BuildArch: noarch > >BuildRequires: pkgconfig(python) >BuildRequires: python-setuptools ># The imagemagick is needed only for the 'convert' commande in the section 'install' >BuildRequires: imagemagick > >Requires: python-beautifulsoup >Requires: kdebase4-runtime >Requires: python-dbus >Requires: tcsh > > >%description >This simple script dynamically renders a list of Brother printer models >and installs the selected one from i386 binary RPM's onto your system. > >It's basically designed for use with Pardus (http://www.pardus.org.tr/eng) >but it also checks for the existence of RPM utility and uses that for >installation. > >%prep >%setup -q -n %{name}-driver-%{version} > >%build >%__python setup.py build > >%install >%__python ./setup.py install -O1 --root=%{buildroot} >%__mkdir -p %{buildroot}%{_datadir}/applications ># For icons >%__mkdir -p %{buildroot}/{%{_iconsdir},%{_miconsdir},%{_liconsdir}} > >%__install -D -m644 %{SOURCE1} %{buildroot}%{_iconsdir}/ > >convert -geometry 32x32 %{SOURCE1} %{buildroot}%{_liconsdir}/%{name}.png >convert -geometry 16x16 %{SOURCE1} %{buildroot}%{_miconsdir}/%{name}.png > >#------------------------------------------------------------------------ >cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF >[Desktop Entry] >GenericName=Install Brother Printer >Name=Install Brother Printer >Comment=Utility to install Brother Printer drivers >Icon=brother.png >Path=%{name} >Type=Application >StartupNotify=true >Categories=System;Settings;Printing;HardwareSettings; >EOF >#------------------------------------------------------------------------ > >%find_lang %{name} > >%post >arc=$"lib" >if [ "$(getconf LONG_BIT)" -eq "64" ]; then > arc=$"lib64" >fi > >sed -i -e "4a Exec=/usr/$arc/kde4/libexec/kdesu -c %{name}" \ > %{_datadir}/applications/%{name}.desktop > > >%files -f %{name}.lang >%{_bindir}/%{name} >%{py_sitedir}/install_brother_printer-%{version}-py%pyver.egg-info >%{_datadir}/brother-driver-installer/ >%{_datadir}/applications/%{name}.desktop >%{_iconsdir}/*.png >%{_miconsdir}/*.png >%{_liconsdir}/*.png > >
Name: install-brother-printer Version: 0.1 Release: %mkrel 2 Summary: Tool to install Brother Printer drivers Group: System/Printing License: GPLv2 URL: https://github.com/ozancaglayan/install-brother-printer-driver # wget https://github.com/ozancaglayan/%%{name}-driver/archive/%%{version}.tar.gz -O %%{name}-%%{version}.tar.gz Source0: %{name}-%{version}.tar.gz Source1: brother.png BuildArch: noarch BuildRequires: pkgconfig(python) BuildRequires: python-setuptools # The imagemagick is needed only for the 'convert' commande in the section 'install' BuildRequires: imagemagick Requires: python-beautifulsoup Requires: kdebase4-runtime Requires: python-dbus Requires: tcsh %description This simple script dynamically renders a list of Brother printer models and installs the selected one from i386 binary RPM's onto your system. It's basically designed for use with Pardus (http://www.pardus.org.tr/eng) but it also checks for the existence of RPM utility and uses that for installation. %prep %setup -q -n %{name}-driver-%{version} %build %__python setup.py build %install %__python ./setup.py install -O1 --root=%{buildroot} %__mkdir -p %{buildroot}%{_datadir}/applications # For icons %__mkdir -p %{buildroot}/{%{_iconsdir},%{_miconsdir},%{_liconsdir}} %__install -D -m644 %{SOURCE1} %{buildroot}%{_iconsdir}/ convert -geometry 32x32 %{SOURCE1} %{buildroot}%{_liconsdir}/%{name}.png convert -geometry 16x16 %{SOURCE1} %{buildroot}%{_miconsdir}/%{name}.png #------------------------------------------------------------------------ cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF [Desktop Entry] GenericName=Install Brother Printer Name=Install Brother Printer Comment=Utility to install Brother Printer drivers Icon=brother.png Path=%{name} Type=Application StartupNotify=true Categories=System;Settings;Printing;HardwareSettings; EOF #------------------------------------------------------------------------ %find_lang %{name} %post arc=$"lib" if [ "$(getconf LONG_BIT)" -eq "64" ]; then arc=$"lib64" fi sed -i -e "4a Exec=/usr/$arc/kde4/libexec/kdesu -c %{name}" \ %{_datadir}/applications/%{name}.desktop %files -f %{name}.lang %{_bindir}/%{name} %{py_sitedir}/install_brother_printer-%{version}-py%pyver.egg-info %{_datadir}/brother-driver-installer/ %{_datadir}/applications/%{name}.desktop %{_iconsdir}/*.png %{_miconsdir}/*.png %{_liconsdir}/*.png
View Attachment As Raw
Actions:
View
Attachments on
bug 11235
: 4354