%define myrelease 1 %define srel /etc/SuSE-release %define rrel /etc/redhat-release %define isSUSE %(test -f %{srel} && echo 1 || echo 0) %define isRH %(test -f %{rrel} && echo 1 || echo 0) %define distro "" %if "%{isSUSE}" > "0" %define REL %(grep VERSION %{srel} | sed -e 's/VERSION = //') %if "%{REL}" >= "8.0" # Bug in SuSE8.0's rpm setup: _initrddir has wrong value %define _initrddir %{_sysconfdir}/init.d %else %define _initrddir %{_sysconfdir}/init.d %endif %define distro SuSE%{REL} %endif %if "%{isRH}" > "0" %define REL %(rpm -q --queryformat '%%{version}' redhat-release) %define distro RH%{REL} %endif %define realrelease %{myrelease}%{distro} Summary: Connectivity for psion series 5. Name: plptools %define version @VERSION@ Version: %{version} Release: %{realrelease} Vendor: The plptools project Packager: Fritz Elfert URL: http://plptools.sourceforge.net/ Source0: http://download.sourceforge.net/plptools/plptools-%{version}.tar.gz Copyright: GPL Group: Networking/Utilities Requires: chkconfig >= 0.9 Buildrequires: readline-devel newt-devel kdelibs-devel >= 2.1 qt-devel >= 2.2.4 BuildRoot: /tmp/plputils-buildroot %package devel Summary: Static library and includes for psion series 5 communication. Group: Development/Libraries Requires: %{name} = %{version} %package kde Summary: Psion support for KDE 2.1. Group: User Interface/Desktops Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4 %description This package contains the programs (client and server), necessary to communicate with a Psion palmtop. The psion's file-system will be automatically mounted under /mnt/psion at the time it is connected to your computer. If the psion is shut down or disconnected, the contents of /mnt/psion will automatically disappear. Other programs included are: - plpftp, a program which allows you to transfer files in a ftp-like manner, view and modifiy processes on your psion. - plpbackup, a backup/restore utility. - plpprintd, a daemon for enabling printing from a Psion Series 5 via any accessible printer. - sisinstall, an installer for Psion's SIS software package format. %description devel This package contains the static library and include files for building programs which can communicate with a Psion palmtop. %description kde This package provides support for a new protocol prefix "psion:/" for KDE 2.1. Any KDE application which uses KDE-conforming URLs, can access files on the Psion. Furthermore, a plugin for Konqueror's file-properties dialog provides access to Psions proprietary file attributes and information about the Psion's drives as well as generic machine information. %description -l de Dieses Packet enthält Programme zur Kommunikation mit einem Psion Palmtop. Das Dateisystem des Psion wird beim Anschließen automatisch unter /mnt/psion eingehängt. Wird der Psion ausgeschaltet oder das Kabel gezogen, so verschwindet der Inhalt dieses Verzeichnisses automatisch und erscheint erneuten Anschließen wieder. Weiterhin sind enthalten: - plpftp, ein Programm welches eine FTP-ähnliche Oberfläche für Dateitransfer bietet und Prozesse auf dem Psion stoppen und starten kann. - plpbackup, ein Backup/Restore Utility für die Kommandozeile. - plpprintd, ein Daemon welcher Ausdrucken von einem Psion Serie 5 über beliebige vefügbare Drucker ermöglicht - sisinstall, ein Installationsprogramm für das Psion-eigene SIS packetformat. %description -l de devel Dieses Packet enthält die statische Bibliothek und include-Dateien zur Programm-Entwicklung von Kommunikations-software für den Psion. %description -l de kde Dieses Packet stellt Unterstützung für eine neues Protokoll-Präfix "psion:/" für KDE 2.1 bereit. Jede KDE Anwendung, die KDE-konforme URLs benutzt, kann damit auf die Dateien eines Psion zugreifen. Weiterhin, liefert ein Plugin für Konqueror's Datei-Eigenschaften-Dialog Informationen über proprietäre Psion-Dateiattribute und stellt Informationen zum Gerät sowie seiner Laufwerke zur Verfügung. %package -n kpsion Summary: Psion utility for KDE 2.1. Group: User Interface/Desktops Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4 %description -n kpsion This package contains a KDE utility program for backup, restore and formatting Psion drives. %description -l de -n kpsion Dieses Packet enthält ein KDE Werkzeug zum Backup, Restore und Formatieren von Psion Laufwerken. %package -n klipsi Summary: Psion remote clipboard utility for KDE 2.1. Group: User Interface/Desktops Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4 %description -n klipsi This package contains a KDE utility for using the Psion's remote clipboard function. %description -l de -n klipsi Dieses Packet enthält ein KDE Werkzeug zum Transfer der Zwischenablage zwischen Psion und Rechner. %changelog * Fri May 25 2001 Fritz Elfert - Added klipsi subpackage * Thu May 17 2001 Fritz Elfert - Official release of version 0.8 * Thu Mar 1 2001 Fritz Elfert - Added KDE sub-packages * Sat Jan 20 2001 Fritz Elfert - Updated to latest version - Using RPM 4 (RH 7.0) * Mon Jan 17 2000 Fritz Elfert - New version 0.5 with lots of bugfixes and additions. * Sat Aug 7 1999 Fritz Elfert - fixed violation of const parameters in rfsv32.cc. - corrected BLOCKSIZE in mp.h to fix behaviour of "du" program. %prep %setup -q %build %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" %configure --enable-kde --with-initdir=%{_initrddir} --with-kdedir=/opt/kde3 %else %configure --enable-kde --with-initdir=%{_initrddir} --with-kdedir=/opt/kde2 %endif %endif %if "%{isRH}" > "0" %configure --enable-kde --with-initdir=%{_initrddir} %endif make %install mkdir -p $RPM_BUILD_ROOT/%{_prefix} $RPM_BUILD_ROOT%{_initrddir} \ # rpm's makeinstall doesn't work here! make DESTDIR=$RPM_BUILD_ROOT install install -m 644 conf/kiodoc-update.pl \ $RPM_BUILD_ROOT%{_datadir}/%{name}/kiodoc-update.pl %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion< "0" install -m755 etc/psion $RPM_BUILD_ROOT%{_initrddir}/psion mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion< "0" /sbin/chkconfig --add psion %endif %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" /sbin/chkconfig --add psion %else ( grep -v START_PSION /etc/rc.config | \ grep -v NCPD_ARGS | grep -v START_PLPNFSD | \ grep -v PLPNFSD_ARGS | grep -v START_PLPPRINTD | \ grep -v PLPPRINTD_ARGS cat<<-EOF # Set START_PSION to yes to start Psion support START_PSION=yes # Specify parameters for ncpd in NCPD_ARGS (if any) NCPD_ARGS= # Set START_PLPNFSD to yes to start plpnfsd START_PLPNFSD=yes # Specify parameters for plpnfsd in PLPNFSD_ARGS (if any) PLPNFSD_ARGS= # Set START_PLPPRINTD to yes to start plpprintd START_PLPPRINTD=yes # Specify parameters for plpprintd in PLPPRINTD_ARGS (if any) PLPPRINTD_ARGS= EOF ) > /etc/rc.config.$$ cp /etc/rc.config /etc/rc.config.old && mv /etc/rc.config.$$ /etc/rc.config /sbin/insserv -d psion %endif %endif %if "%{isRH}" > "0" %triggerin kde -- kdebase, kde-i18n-German perl %{_datadir}/%{name}/kiodoc-update.pl -a psion %endif %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" %triggerin kde -- kdebase3, kde-i18n-de perl %{_datadir}/%{name}/kiodoc-update.pl -a psion %else %triggerin kde -- kdebase, kde-i18n-de perl %{_datadir}/%{name}/kiodoc-update.pl -a psion %endif %endif %post kde KONQRC=`kde-config --expandvars --install config`/konquerorrc if test -f $KONQRC && grep -q '\[Notification Messages\]' $KONQRC ; then cp $KONQRC $KONQRC.$$ cat $KONQRC.$$ | grep -v "askSaveinode/x-psion-drive=No" | sed \ -e '/\[Notification Messages\]/a\' \ -e 'askSaveinode/x-psion-drive=No' > $KONQRC && \ rm -f $KONQRC.$$ else cat>>$KONQRC</dev/null 2>&1 %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" /sbin/chkconfig --del psion %else /sbin/insserv -r -d psion %endif %endif %if "%{isRH}" > "0" /sbin/chkconfig --del psion %endif fi %preun kde if [ "$1" = 0 ] then perl %{_datadir}/%{name}/kiodoc-update.pl -r psion KONQRC=`kde-config --expandvars --install config`/konquerorrc if test -f $KONQRC ; then cp $KONQRC $KONQRC.$$ grep -v 'askSaveinode/x-psion-drive=' $KONQRC.$$ > $KONQRC && \ rm -f $KONQRC.$$ fi fi %files %doc COPYING INSTALL CHANGES ChangeLog README TODO etc/*magic patches %{_bindir}/plpftp %{_bindir}/plpbackup %{_bindir}/sisinstall %{_sbindir}/* %{_mandir}/*/* %{_libdir}/libplp.so.* %{_libdir}/libplp.la %{_datadir}/locale/*/LC_MESSAGES/plptools.mo %{_datadir}/%{name}/* %config %{_initrddir}/psion %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" %{_sysconfdir}/sysconfig/psion %endif %endif %if "%{isRH}" > "0" %{_sysconfdir}/sysconfig/psion %endif %files devel %doc doc/api etc/*.spec %{_libdir}/libplp.a %{_libdir}/libplp.so %{_includedir}/%{name}/* %files kde %{_libdir}/kde*/kio_plp.so* %{_libdir}/kde*/kio_plp.la %{_libdir}/kde*/libplpprops.so* %{_libdir}/kde*/libplpprops.la %{_datadir}/services/* %{_datadir}/icons/*/*/mimetypes/* %{_datadir}/icons/*/*/devices/* %{_datadir}/icons/*/*/apps/psion* %{_datadir}/locale/*/LC_MESSAGES/libplpprops.mo %{_datadir}/mimelnk/*/* %{_datadir}/doc/HTML/*/kioslave/* %{_datadir}/%{name}/kiodoc-update.pl %files -n kpsion %{_bindir}/kpsion %{_libdir}/libkpsion.so %{_libdir}/libkpsion.la %{_datadir}/applnk/*/kpsion* %{_datadir}/apps/kpsion/* %{_datadir}/apps/konqueror/* %{_datadir}/icons/*/*/apps/kpsion* %{_datadir}/icons/*/*/actions/psion* %{_datadir}/locale/*/LC_MESSAGES/kpsion.mo %{_datadir}/doc/HTML/*/kpsion %files -n klipsi %{_bindir}/klipsi %{_libdir}/klipsi.so %{_libdir}/klipsi.la %{_datadir}/applnk/*/klipsi* %{_datadir}/apps/klipsi/* %{_datadir}/icons/*/*/apps/klipsi* %{_datadir}/icons/*/*/actions/klipsi* %{_datadir}/locale/*/LC_MESSAGES/klipsi.mo