aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-07-18 05:20:32 +0000
committerFritz Elfert <felfert@to.com>2002-07-18 05:20:32 +0000
commit4994d8c3435a66686345b76303420eaffef45301 (patch)
treee4d76f46666196bb38a9b7042bb6a872f566a1ba /etc
parente971871af853c19afd99df4ce5c2ad0f736356a8 (diff)
downloadplptools-4994d8c3435a66686345b76303420eaffef45301.tar.gz
plptools-4994d8c3435a66686345b76303420eaffef45301.tar.bz2
plptools-4994d8c3435a66686345b76303420eaffef45301.zip
- Update KDEHelp's cache after installing kioslave docs
- Fix in autodetection of qt - Added START_NCPD to config files, changed initscripts accordingly. - Lot of tweaks in RPM specfile for Mandrake 8.2 - On old RedHat 7.2 with KDE2, /lib/qt2 does not exist, use QTDIR - Fixed some dscriptions in specfile - Removed mgetty cruft in initscripts - XML related fixes in kioslave doc
Diffstat (limited to 'etc')
-rw-r--r--etc/plptools.spec.in90
-rwxr-xr-xetc/psion.SuSE.in84
-rwxr-xr-xetc/psion.SuSE8.in55
-rwxr-xr-xetc/psion.in47
4 files changed, 162 insertions, 114 deletions
diff --git a/etc/plptools.spec.in b/etc/plptools.spec.in
index 50a9795..6d12d9f 100644
--- a/etc/plptools.spec.in
+++ b/etc/plptools.spec.in
@@ -3,9 +3,21 @@
%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 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
%define distro ""
+#
+# 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
+#
%if "%{isSUSE}" > "0"
%define REL %(grep VERSION %{srel} | sed -e 's/VERSION = //')
@@ -19,11 +31,19 @@
%endif
%define distro SuSE%{REL}
%endif
-%if "%{isRH}" > "0"
-%define REL %(rpm -q --queryformat '%%{version}' redhat-release)
+%define _qtdir ""
+%if "%{isRH}" > "1"
+%define REL %(rpm -qf --queryformat '%%{version}' %{rrel})
%define distro RH%{REL}
%define _kdedir /usr
+%define _qtdir %(test -n "$QTDIR" && echo \"--with-qt-dir=$QTDIR\" || echo '""')
%endif
+%if "%{isMDK}" > "0"
+%define REL %(rpm -qf --queryformat '%%{version}' %{mrel})
+%define distro mdk%{REL}
+%define _kdedir /usr
+%endif
+
%define _kdebindir %{_kdedir}/bin
%define _kdelibdir %{_kdedir}/lib
%define _kdedatadir %{_kdedir}/share
@@ -44,15 +64,12 @@ Buildrequires: readline-devel newt-devel kdelibs-devel >= 2.1
%if "%{REL}" >= "8.0"
# aaa_base provides chkconfig
Requires: aaa_base >= 2002.3.27-0
-Buildrequires: qt3-devel >= 3.0.3
%else
Requires: aaa_base >= 2001.10.19-1
-Buildrequires: qt-devel >= 2.2.4
%endif
%endif
%if "%{isRH}" > "0"
Requires: chkconfig >= 0.9
-Buildrequires: qt-devel >= 2.2.4
%endif
BuildRoot: /tmp/plputils-buildroot
@@ -62,9 +79,9 @@ Group: Development/Libraries
Requires: %{name} = %{version}
%package kde
-Summary: Psion support for KDE 2.1.
+Summary: Psion support for KDE.
Group: User Interface/Desktops
-Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4
+Requires: %{name} = %{version}
%description
This package contains the programs (client and server), necessary to
@@ -86,7 +103,7 @@ 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
+KDE. 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.
@@ -111,16 +128,16 @@ 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
+für KDE 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.
+Summary: Psion utility for KDE.
Group: User Interface/Desktops
-Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4
+Requires: %{name} = %{version}
%description -n kpsion
This package contains a KDE utility program for backup, restore and formatting
@@ -131,9 +148,9 @@ 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.
+Summary: Psion remote clipboard utility for KDE.
Group: User Interface/Desktops
-Requires: %{name} = %{version} kdelibs >= 2.1 qt >= 2.2.4
+Requires: %{name} = %{version}
%description -n klipsi
This package contains a KDE utility for using the Psion's remote clipboard
@@ -177,8 +194,14 @@ zwischen Psion und Rechner.
%configure --enable-kde --with-initdir=%{_initrddir} --with-kdedir=/opt/kde2
%endif
%endif
+%if "%{isMDK}" > "0"
+# Mandrake's libtool builds, but refuses to install kde modules into
+# a directory not ending with /usr/lib - kinda strange
+#
+%define __libtoolize true
+%endif
%if "%{isRH}" > "0"
-%configure --enable-kde --with-initdir=%{_initrddir}
+%configure --enable-kde %{_qtdir} --with-initdir=%{_initrddir}
%endif
make
@@ -192,6 +215,7 @@ install -m 644 conf/kiodoc-update.pl \
%if "%{REL}" >= "8.0"
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion<<EOF
+START_NCPD=yes
NCPD_ARGS=
START_PLPNFSD=yes
PLPNFSD_ARGS=
@@ -207,6 +231,7 @@ install -m755 etc/psion.SuSE $RPM_BUILD_ROOT%{_initrddir}/psion
install -m755 etc/psion $RPM_BUILD_ROOT%{_initrddir}/psion
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
cat>$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/psion<<EOF
+START_NCPD=yes
NCPD_ARGS=
START_PLPNFSD=yes
PLPNFSD_ARGS=
@@ -214,6 +239,12 @@ START_PLPPRINTD=yes
PLPPRINTD_ARGS=
EOF
%endif
+%if "%{isMDK}" > "0"
+# Mandrake has a different menu structure
+mkdir -p $RPM_BUILD_ROOT%{_kdedatadir}/applnk-mdk/Office/PDA
+mv $RPM_BUILD_ROOT%{_kdedatadir}/applnk/Utilities/*.desktop \
+ $RPM_BUILD_ROOT%{_kdedatadir}/applnk-mdk/Office/PDA
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -230,12 +261,14 @@ test ! -d /mnt/psion && mkdir -p /mnt/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
+ 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
@@ -253,11 +286,16 @@ cp /etc/rc.config /etc/rc.config.old && mv /etc/rc.config.$$ /etc/rc.config
%endif
%endif
-%if "%{isRH}" > "0"
+%if "%{isRH}" > "1"
%triggerin kde -- kdebase, kde-i18n-German
perl %{_datadir}/%{name}/kiodoc-update.pl -a psion
%endif
+%if "%{isMDK}" > "0"
+%triggerin kde -- kdebase, kde-i18n-de
+perl %{_datadir}/%{name}/kiodoc-update.pl -a psion
+%endif
+
%if "%{isSUSE}" > "0"
%if "%{REL}" >= "8.0"
%triggerin kde -- kdebase3, kde-i18n-de
@@ -331,14 +369,14 @@ fi
%{_libdir}/libplp.la
%{_datadir}/locale/*/LC_MESSAGES/plptools.mo
%{_datadir}/%{name}/*
-%config %{_initrddir}/psion
+%{_initrddir}/psion
%if "%{isSUSE}" > "0"
%if "%{REL}" >= "8.0"
-%{_sysconfdir}/sysconfig/psion
+%config %{_sysconfdir}/sysconfig/psion
%endif
%endif
%if "%{isRH}" > "0"
-%{_sysconfdir}/sysconfig/psion
+%config %{_sysconfdir}/sysconfig/psion
%endif
%files devel
@@ -365,7 +403,11 @@ fi
%{_kdebindir}/kpsion
%{_kdelibdir}/libkpsion.so
%{_kdelibdir}/libkpsion.la
+%if "%{isMDK}" > "0"
+%{_kdedatadir}/applnk-mdk/Office/PDA/kpsion*
+%else
%{_kdedatadir}/applnk/*/kpsion*
+%endif
%{_kdedatadir}/apps/kpsion/*
%{_kdedatadir}/apps/konqueror/*
%{_kdedatadir}/icons/*/*/apps/kpsion*
@@ -377,7 +419,11 @@ fi
%{_kdebindir}/klipsi
%{_kdelibdir}/klipsi.so
%{_kdelibdir}/klipsi.la
+%if "%{isMDK}" > "0"
+%{_kdedatadir}/applnk-mdk/Office/PDA/klipsi*
+%else
%{_kdedatadir}/applnk/*/klipsi*
+%endif
%{_kdedatadir}/apps/klipsi/*
%{_kdedatadir}/icons/*/*/apps/klipsi*
%{_kdedatadir}/icons/*/*/actions/klipsi*
diff --git a/etc/psion.SuSE.in b/etc/psion.SuSE.in
index 077244d..2d37e66 100755
--- a/etc/psion.SuSE.in
+++ b/etc/psion.SuSE.in
@@ -15,49 +15,49 @@ test "$START_PSION" = yes || exit 0
test -f @prefix@/sbin/ncpd || exit 0
test -f @prefix@/sbin/plpnfsd || exit 0
+test -f @prefix@/sbin/plpprintd || exit 0
# The echo return value for success (defined in /etc/rc.config).
-return=$rc_done
-
-MGETTY_HASPLP=false
+showresult() {
+ test RETVAL -eq 0 && echo -e $rc_done || echo -e $rc_failed
+}
-if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then
- mrun=`pidofproc mgetty`
- test -n "$mrun" && MGETTY_HASPLP=true
-fi
+showstatus() {
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+ checkproc @prefix@/sbin/$1 && \
+ echo -n "$1 running " || \
+ echo -n "No running $1 "
+}
start() {
- if $MGETTY_HASPLP ; then
- echo "NOT Starting ncpd because mgetty configured for PLP"
- exit 0
+ echo "Starting Psion support ..."
+ RETVAL=0
+ if test "$START_NCPD" = "yes" ; then
+ echo -n " ncpd: "
+ /sbin/startproc @prefix@/sbin/ncpd $NCPD_ARGS
+ RETVAL=$?
+ showresult
fi
- echo -n "Starting Psion support (ncpd): "
- /sbin/startproc @prefix@/sbin/ncpd $NCPD_ARGS
- RETVAL=$?
if test "$START_PLPNFSD" = "yes" ; then
- if [ $RETVAL -eq 0 ] ; then
- echo -e "$return"
- echo -n "Starting Psion support (plpnfsd): "
- /sbin/startproc @prefix@/sbin/plpnfsd $PLPNFSD_ARGS
- RETVAL=$?
- fi
+ echo -n " plpnfsd: "
+ /sbin/startproc @prefix@/sbin/plpnfsd $PLPNFSD_ARGS
+ RETVAL=$?
+ showresult
fi
if test "$START_PLPPRINTD" = "yes" ; then
- if [ $RETVAL -eq 0 ] ; then
- echo -e "$return"
- echo -n "Starting Psion support (plpprintd): "
- /sbin/startproc @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
- RETVAL=$?
- fi
+ echo -n " plpprintd: "
+ /sbin/startproc @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
+ RETVAL=$?
+ showresult
fi
- test $RETVAL -eq 0 || return=$rc_failed
- echo -e "$return"
return $RETVAL
}
stop() {
- echo -n "Stopping Psion support: "
+ echo "Stopping Psion support ..."
if test "$START_PLPNFSD" = "yes" ; then
+ echo -n " plpnfsd: "
/bin/killproc -HUP plpnfsd
WAIT=5
while test $WAIT -gt 0 ; do
@@ -65,15 +65,22 @@ stop() {
sleep 1 # allow plpnfsd flushing it's cache
WAIT=`expr $WAIT - 1`
done
- test -n "`pidof plpnfsd`" && killproc plpnfsd
+ test -z "`pidof plpnfsd`" || killproc plpnfsd
+ RETVAL=$?
+ showresult
fi
if test "$START_PLPPRINTD" = "yes" ; then
+ echo -n " plpprintd: "
/sbin/killproc -TERM plpprintd
+ RETVAL=$?
+ showresult
+ fi
+ if test "$START_NCPD" = "yes" ; then
+ echo -n " ncpd: "
+ /sbin/killproc -TERM ncpd
+ RETVAL=$?
+ showresult
fi
- /sbin/killproc -TERM ncpd
- RETVAL=$?
- test $RETVAL -eq 0 || return=$rc_failed
- echo -e "$return"
return $RETVAL
}
@@ -94,14 +101,9 @@ case "$1" in
status)
echo -n "Checking for Psion support: "
- ## Check status with checkproc(8), if process is running
- ## checkproc will return with exit status 0.
- checkproc @prefix@/sbin/ncpd && \
- echo -n "ncpd running " || \
- echo -n "No running ncpd "
- checkproc @prefix@/sbin/plpnfsd && \
- echo -n "plpnfsd running " || \
- echo -n "No running plpnfsd "
+ showstatus ncpd
+ showstatus plpnfsd
+ showstatus plpprintd
;;
*)
diff --git a/etc/psion.SuSE8.in b/etc/psion.SuSE8.in
index e3f620e..3c52cd6 100755
--- a/etc/psion.SuSE8.in
+++ b/etc/psion.SuSE8.in
@@ -18,40 +18,32 @@
[ -f /etc/sysconfig/psion ] || exit 0
. /etc/sysconfig/psion
-MGETTY_HASPLP=false
-
-if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then
- mrun=`pidofproc mgetty`
- test -n "$mrun" && MGETTY_HASPLP=true
-fi
-
rc_reset
start() {
- if $MGETTY_HASPLP ; then
- echo "NOT Starting ncpd because mgetty configured for PLP"
- exit 0
+ echo "Starting Psion support ..."
+ if [ "$START_NCPD" = "yes" ] ; then
+ echo -n " ncpd: "
+ startproc -f @prefix@/sbin/ncpd $NCPD_ARGS
+ rc_status -v
+ fi
+ if [ "$START_PLPNFSD" = "yes" ] ; then
+ echo -n " plpnfsd: "
+ startproc -f @prefix@/sbin/plpnfsd $PLPNFSD_ARGS
+ rc_status -v
fi
- echo -n "Starting Psion support (ncpd): "
- startproc -f @prefix@/sbin/ncpd $NCPD_ARGS
- if rc_status -v ; then
- if [ "$START_PLPNFSD" = "yes" ] ; then
- echo -n "Starting Psion support (plpnfsd): "
- startproc -f @prefix@/sbin/plpnfsd $PLPNFSD_ARGS
- rc_status -v
- fi
- if [ "$START_PLPPRINTD" = "yes" ] ; then
- echo -n "Starting Psion support (plpprintd): "
- startproc -f @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
- rc_status -v
- fi
+ if [ "$START_PLPPRINTD" = "yes" ] ; then
+ echo -n " plpprintd: "
+ startproc -f @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
+ rc_status -v
fi
rc_status && touch /var/lock/subsys/psion
}
stop() {
- echo -n "Stopping Psion support: "
+ echo "Stopping Psion support ..."
if [ "$START_PLPNFSD" = "yes" ] ; then
+ echo -n " plpnfsd: "
killproc -HUP @prefix@/sbin/plpnfsd
WAIT=5
while test $WAIT -gt 0 ; do
@@ -59,16 +51,21 @@ stop() {
sleep 1 # allow plpnfsd flushing it's cache
WAIT=`expr $WAIT - 1`
done
- test -n "`pidofproc plpnfsd`" && \
+ test -z "`pidofproc plpnfsd`" || \
killproc -TERM @prefix@/sbin/plpnfsd
- rc_status
+ rc_status -v
fi
if [ "$START_PLPPRINTD" = "yes" ] ; then
+ echo -n " plpprintd: "
killproc -TERM @prefix@/sbin/plpprintd
- rc_status
+ rc_status -v
+ fi
+ if [ "$START_NCPD" = "yes" ] ; then
+ echo -n " ncpd: "
+ killproc -TERM @prefix@/sbin/ncpd
+ rc_status -v
fi
- killproc -TERM @prefix@/sbin/ncpd
- rc_status -v && rm -f /var/lock/subsys/psion
+ rc_status && rm -f /var/lock/subsys/psion
}
restart() {
diff --git a/etc/psion.in b/etc/psion.in
index 3c7cf56..fa807f7 100755
--- a/etc/psion.in
+++ b/etc/psion.in
@@ -10,34 +10,28 @@
[ -f @prefix@/sbin/ncpd ] || exit 0
[ -f @prefix@/sbin/plpnfsd ] || exit 0
+[ -f @prefix@/sbin/plpprintd ] || exit 0
[ -f /etc/sysconfig/psion ] || exit 0
. /etc/sysconfig/psion
-MGETTY_HASPLP=false
-
-if grep -qs ^/PLP/ /etc/mgetty+sendfax/login.config ; then
- mrun=`pidofproc mgetty`
- test -n "$mrun" && MGETTY_HASPLP=true
-fi
-
start() {
- if $MGETTY_HASPLP ; then
- echo "NOT Starting ncpd because mgetty configured for PLP"
- exit 0
+ echo "Starting Psion support ..."
+ RETVAL=0
+ if test "$START_NCPD" = "yes" ; then
+ echo -n " ncpd: "
+ daemon @prefix@/sbin/ncpd $NCPD_ARGS
+ RETVAL=$?
+ echo
fi
- echo -n "Starting Psion support (ncpd): "
- daemon @prefix@/sbin/ncpd $NCPD_ARGS
- RETVAL=$?
- echo
if [ $RETVAL -eq 0 ] ; then
if test "$START_PLPNFSD" = "yes" ; then
- echo -n "Starting Psion support (plpnfsd): "
+ echo -n " plpnfsd: "
daemon @prefix@/sbin/plpnfsd $PLPNFSD_ARGS
RETVAL=$?
echo
fi
if test "$START_PLPPRINTD" = "yes" ; then
- echo -n "Starting Psion support (plpprintd): "
+ echo -n " plpprintd: "
daemon @prefix@/sbin/plpprintd $PLPPRINTD_ARGS
RETVAL=$?
echo
@@ -48,8 +42,10 @@ start() {
}
stop() {
- echo -n "Stopping Psion support: "
+ echo "Stopping Psion support ..."
+ RETVAL=0
if test "$START_PLPNFSD" = "yes" ; then
+ echo -n " plpnfsd: "
killproc plpnfsd -HUP
WAIT=5
while test $WAIT -gt 0 ; do
@@ -57,14 +53,20 @@ stop() {
sleep 1 # allow plpnfsd flushing it's cache
WAIT=`expr $WAIT - 1`
done
- test -n "`pidofproc plpnfsd`" && killproc plpnfsd
+ test -z "`pidofproc plpnfsd`" || killproc plpnfsd
+ echo
fi
if test "$START_PLPPRINTD" = "yes" ; then
+ echo -n " plpprintd: "
killproc plpprintd
+ echo
+ fi
+ if test "$START_NCPD" = "yes" ; then
+ echo -n " ncpd: "
+ killproc ncpd
+ RETVAL=$?
+ echo
fi
- killproc ncpd
- RETVAL=$?
- echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/psion
return $RETVAL
}
@@ -83,8 +85,9 @@ case "$1" in
stop
;;
status)
- status plpnfsd
status ncpd
+ status plpnfsd
+ status plpprintd
;;
restart|reload)
restart