xnview wrote:I'll release a 1.70 in middle of september.
This is great. May I help you a tiny little bit with the RPM packaging?
I would like to suggest the following:
- Move the whole application from /usr/X11R6 to /usr and package the app-defaults file as documentation. This might be a good idea because X11R7 is going to be there soon. X11R7 will be binary compatible with X11R6, but it will be installed inside /usr, and /usr/X11R6 will disappear.
- Move the man pages to /usr/share/man/man1 because this is now the location that is used by all Linux distros.
- Encode the documentation files in UTF-8 instead of ISO8859-1 because this is now the default character encoding on all distributions. This is not required for more sophisticated editors like the GNOME and KDE ones, but it is required for the "more" and "less" commands.
- Leave the Filters in /usr/share/XnView, where they are, because this is the correct place.
- Create desktop menu entries for GNOME and KDE because it's convenient for the users and very easy to do.
The following is a sample SPEC file which will build an RPM, as described above, from the binary tarball of version 1.68.1.
Code: Select all
#
# spec file for package XnView (Version 1.68.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define _prefix /usr
Name: XnView
License: Freeware
Group: Productivity/Graphics/Viewers
Summary: Efficient multimedia viewer, browser and converter
Summary(fr): ...enter French summary here, if desired...
Summary(de): ...enter German summary here, if desired...
Version: 1.68.1
Release: 0
URL: http://perso.wanadoo.fr/pierre.g/
Source0: XnView-x86-unknown-linux2.x-static.tgz
Source1: xnview.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: i386
%description
XnView is a utility for viewing and converting graphic files. XnView is
provided as Freeware for private non-commercial or educational use.
Authors:
--------
Pierre-Emmanuel Gougelet <pierre.g@wanadoo.fr>
%description -l fr
...enter French description here, if desired...
%description -l de
...enter German description here, if desired...
%prep
%setup -n XnView-1.68-x86-unknown-linux2.x-static
%build
for i in *.txt ; do
iconv -f ISO8859-1 -t UTF-8 $i > $i.tmp && mv $i.tmp $i
done
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_prefix}/bin
cp bin/* %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_prefix}/lib
cp lib/libformat.so.4.16 %{buildroot}%{_prefix}/lib
ln -s libformat.so.4.16 %{buildroot}%{_prefix}/lib/libformat.so
mkdir -p %{buildroot}%{_prefix}/share/man/man1
cp man/* %{buildroot}%{_prefix}/share/man/man1
mkdir -p %{buildroot}%{_prefix}/share/pixmaps
cp %{SOURCE1} %{buildroot}%{_prefix}/share/pixmaps
mkdir -p %{buildroot}%{_prefix}/share/XnView/Filters
cat << EOF > %{buildroot}%{_prefix}/share/XnView/Filters/udf-def.dat
# XnView UDF v1.0 (do not edit)
average 3 | 3 1 0 | 1x9
average 5 | 5 25 0 | 1x25
blur | 3 16 0 | 1 2 1 2 4 2 1 2 1
emboss | 3 1 128 | -1 0x7 -1
EOF
mkdir -p %{buildroot}%{_prefix}/share/applications
cat << EOF > %{buildroot}%{_prefix}/share/applications/xnview.desktop
[Desktop Entry]
Encoding=UTF-8
Name=XnView
GenericName=Image Viewer
Type=Application
Exec=xnview
Icon=xnview.png
Categories=Application;Graphics;Viewer;
EOF
%clean
rm -rf %{buildroot}
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%doc *.txt app-defaults/XnView.ad
%{_prefix}/bin/nconvert
%{_prefix}/bin/nview
%{_prefix}/bin/xnview
%{_prefix}/lib/libformat.so
%{_prefix}/lib/libformat.so.4.16
%{_prefix}/share/XnView
%{_prefix}/share/applications/xnview.desktop
%{_prefix}/share/pixmaps/xnview.png
%{_prefix}/share/man/man1/nview.1*
%{_prefix}/share/man/man1/xnview.1*
%changelog -n XnView
* Tue Aug 23 2005 - root@localhost
- initial package
I am using the following Icon as Source1:
This will create an RPM with the described feautures and a nice menu entry for KDE and GNOME. Feel free to use it for your own package, and again thanks for your great software!