From an iPrint servers' main page, all client rpm can be downloaded. So there is no need to install platform X in order to dowload the client rpm for platform X.
We unpack the Debian package (created with alien
):
mkdir -p unpack/DEBIAN &&\
dpkg -X novell-iprint-xclient-sl_6.500.20070508-2_amd64.deb unpack &&\
dpkg -e novell-iprint-xclient-sl_6.500.20070508-2_amd64.deb unpack/DEBIAN
Then we enter the unpack
directory, and start moving things around:
We move the log file to a proper place:
cd unpack
mkdir -p var/log/iprint && rm -rf var/opt/
We move the manpage to a proper place:
mkdir -p usr/share/man/man1 &&\
mv opt/novell/man/man1/iprntcmd.1 usr/share/man/man1 &&\
gzip usr/share/man/man1/iprntcmd.1 &&\
rm -rf opt/novell/man/
We move around some libraries:
mv opt/novell/lib/* usr/lib
mv opt/novell/lib64/* usr/lib64
rm -rf opt/novell/lib*
We push around some messages:
mv opt/novell/iprint/share/locale usr/share/
We push around (and convert in the process) some icons:
mkdir -p usr/share/icons/gnome/32x32/apps/
convert opt/novell/iprint/share/icons/iprint_32.gif \
usr/share/icons/gnome/32x32/apps/iprint.png
mkdir -p usr/share/icons/kdeclassic/32x32/apps
convert opt/novell/iprint/share/icons/iprint_32.gif \
usr/share/icons/kdeclassic/32x32/apps/iprint.png
mkdir -p usr/share/icons/gnome/16x16/apps
convert opt/novell/iprint/share/icons/iprint_16.gif \
usr/share/icons/gnome/16x16/apps/iprint.png
mkdir -p usr/share/icons/kdeclassic/16x16/apps
convert opt/novell/iprint/share/icons/iprint_16.gif \
usr/share/icons/kdeclassic/16x16/apps/iprint.png
rm -rf opt/novell/iprint/share/
We move around a few binaries:
mkdir -p usr/bin
mv opt/novell/iprint/bin/* usr/bin/
rm -rf opt/novell/iprint/bin
We move around some plugins:
mkdir -p usr/lib/iprint
mv opt/novell/iprint/plugin/* usr/lib/iprint/
rm -rf opt/novell/iprint/
We move around some desktop links:
mkdir -p usr/share/applications/kde/
mv opt/kde3/share/applications/novell-iprint.desktop usr/share/applications/kde/
mkdir usr/share/autostart
mv opt/kde3/share/autostart/novell-iprint.desktop usr/share/autostart/
mkdir -p usr/share/gnome/autostart
mv opt/gnome/share/autostart/novell-iprint.desktop usr/share/gnome/autostart
We handle some plugins:
mkdir -p usr/lib/mozilla/plugins/
mkdir -p usr/lib/firefox/plugins/
mkdir -p usr/lib/iceweasel/plugins/
cd usr/lib/mozilla/plugins/
rm ./*
ln -s ../../iprint/npnipp* ./
cd ../../firefox/plugins/
rm -rf ./*
ln -s ../../iprint/npnipp* ./
cd ../../iceweasel/plugins/
ln -s ../../iprint/npnipp* ./
rm -rf opt
We clean up some odds and ends that are not needed any more because we put our files in default directories:
rm -rf etc/ld.so.conf.d
rm -rf etc/profile.d
We leave etc/opt/novell/iprint/libiprint.conf
in place because we suspect it has been hardcoded here and there.
We modify some files that contain SuSE-specific path info:
sed -i 's%/opt/novell/iprint/bin/iprint-listener%/usr/bin/iprint-listener%g; s%/opt/novell/iprint/share/icons/iprint_32.gif%/usr/share/icons/kdeclassic/32x32/apps/iprint.png%g' usr/share/applications/kde/novell-iprint.desktop
sed -i 's%/opt/novell/iprint/bin/iprint-listener%/usr/bin/iprint-listener%g; s%/opt/novell/iprint/share/icons/iprint_32.gif%/usr/share/icons/kdeclassic/32x32/apps/iprint.png%g' usr/share/gnome/autostart/novell-iprint.desktop
sed -i 's%/opt/novell/iprint/bin/iprint-listener%/usr/bin/iprint-listener%g' usr/bin/iprint-gnome-init
cd usr/share/autostart/
rm novell-iprint.desktop
ln -s ../applications/kde/novell-iprint.desktop ./
We modify the Debian control file to make the package depend on libglitz1
:
sed -i '/^Depends:/ s%$%, libglitz1%g' DEBIAN/control
We truncate DEBIAN/conffiles
cd etc/ && ln -s opt/novell/iprint/libiprint.conf ./
echo -e "/etc/opt/novell/iprint/libiprint.conf\n/etc/libiprint.conf" > DEBIAN/conffiles
We update the md5 checksums:
find -type f -exec md5sum {} \; |grep -v DEBIAN|sed 's%\.\/%%g' > DEBIAN/md5sums
We create a directory /var/log/novell/iprint/client
and modify the postinstall script to set permissions on it
mkdir -p /var/log/novell/iprint/client &&
sed -i 's%\/var\/opt\/novell\//log\/novell\/iprint%g' DEBIAN/postinst
Then we build a package from it:
mv unpack novell-iprint-xclient-sl-amd64 \&\&
dpkg-deb -b novell-iprint-xclient-sl-amd64
Warning | |
---|---|
The path to |
Warning | |
---|---|
Please note that the resulting Debian package doesn't have all dependencies properly listed, and it isn't signed. It wouldn't be much use in a serious repository. |
Procedure 67. Trying out the new package
First we remove the package we created with alien
, and we check what remains of the package:
sudo apt-get remove novell-iprint-xclient-sl libglitz1
for LINE in $(find etc usr var -not -type d ) ; do if [ -e "/${LINE}" ] ; then echo "/${LINE} still exists" ; fi ; done