%define version @VERSION@ %define myrelease 1 %define srel /etc/SuSE-release %define rrel /etc/redhat-release %define mrel /etc/mandrake-release %define isSUSE %(test -f %{srel} && echo 1 || echo 0) %define isRH %(test -f %{rrel} && echo 2 || echo 0) %define isMDK %(test -f %{mrel} && echo 1 || echo 0) %if "%{isMDK}" > "0" %define isRH 1 %endif # # Running the above, results in: # # RedHat: isSUSE=0 isRH=2 isMDK=0 # Mandrake: isSUSE=0 isRH=1 isMDK=1 # SuSE: isSUSE=1 isRH=0 isMDK=0 # %define _qtdir "" %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}" > "1" %define REL %(rpm -qf --queryformat '%%{version}' %{rrel}) %define distro RH%{REL} # Old RH7.2 has QT in qt-2.x.x which is not autodetected in configure %define _qtdir %(test -n "$QTDIR" && echo \"--with-qt-dir=$QTDIR\" || :) %endif %if "%{isMDK}" > "0" %define REL %(rpm -qf --queryformat '%%{version}' %{mrel}) %define distro mdk%{REL} %endif %define realrelease %{myrelease}%{distro} # # Conditionals # %{?_without_distro: %define realrelease %{myrelease}} %{?_with_debug: %define __spec_install_post /usr/lib/rpm/brp-compress} %{?_with_debug: %define _with_debug --enable-debug} %{?_with_debug: %define optflags -g} %{!?_with_debug: %define _with_debug --disable-debug} Summary: Connectivity for psion series 5. Name: plptools 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 Buildrequires: readline-devel newt-devel %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" Requires: aaa_base >= 2002.3.27-0 %else Requires: aaa_base >= 2001.10.19-1 %endif %endif %if "%{isRH}" > "0" Requires: chkconfig >= 0.9 %endif BuildRoot: %{_tmppath}/plputils-buildroot %package devel Summary: Static library and includes for psion series 5 communication. Group: Development/Libraries Requires: %{name} = %{version} %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. - 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 -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. - 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. %changelog * Tue Nov 20 2007 Reuben Thomas - Butchered out the KDE bits; no testing done afterwards * 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 %if "%{isSUSE}" > "0" # SuSE's depencies are pretty broken. Example: For the KDE stuff, # RPM's automatic find-requires generates a depency to libGLcore # if the build-system has Nvidia drivers installed. Our KDE stuff # definitively does NOT depend on it! # Therefore, we filter some unnecessary stuff out: cat<find-requires #!/bin/sh %{__find_requires} "$@" |egrep -v 'libGL|freetype|libfam' EOF chmod a+x find-requires %define __find_requires %{_builddir}/%{buildsubdir}/find-requires %endif %if "%{isMDK}" > "0" # Mandrake's RPM generates similar odd depencies. cat<find-requires #!/bin/sh %{__find_requires} "$@" |egrep -v 'libGL|freetype' EOF chmod a+x find-requires %define __find_requires %{_builddir}/%{buildsubdir}/find-requires %endif %build %if "%{isSUSE}" > "0" # SuSE's libtools are breaking everything %define __libtoolize true %configure --with-initdir=%{_initrddir} %{_with_debug} %configure --with-initdir=%{_initrddir} %{_with_debug} %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 %if "%{isSUSE}" > "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" # Mandrake has a menu configurator mkdir -p $RPM_BUILD_ROOT%{_libdir}/menu %endif %clean rm -rf $RPM_BUILD_ROOT %post ldconfig test ! -d /mnt/psion && mkdir -p /mnt/psion %if "%{isRH}" > "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 START_NCPD | 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 # Set START_NCPD to yes to start ncpd START_NCPD=yes # Specify parameters for ncpd in NCPD_ARGS (if any) NCPD_ARGS= # Set START_PLPNFSD to yes to start plpnfsd START_PLPNFSD=no # 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 fi %preun if [ "$1" = 0 ] then %{_initrddir}/psion stop >/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 %files %doc COPYING INSTALL CHANGES ChangeLog README TODO etc/*magic %{_bindir}/plpftp %{_bindir}/sisinstall %{_sbindir}/* %{_mandir}/*/* %{_libdir}/libplp.so.* %{_libdir}/libplp.la %{_datadir}/locale/*/LC_MESSAGES/plptools.mo %{_datadir}/%{name}/* %{_initrddir}/psion %if "%{isSUSE}" > "0" %if "%{REL}" >= "8.0" %config %{_sysconfdir}/sysconfig/psion %endif %endif %if "%{isRH}" > "0" %config %{_sysconfdir}/sysconfig/psion %endif %files devel %doc doc/api etc/*.spec %{_libdir}/libplp.a %{_libdir}/libplp.so %{_includedir}/%{name}/*