Fri, 16 Jan 2009 10:58:21 +0100
Correct and improve code logic, buildconf, and packaging. In particular:
1. Use descriptive variable names <var>libs instead of just <var>.
2. Although Nokia states in all Qt builds that 'NOTE: When linking
against OpenSSL, you can override the default library names
through OPENSSL_LIBS.' and even gives an example, their own
configuration logic rejects such an attempt. Correct this by
hard coding the OpenSSL library string in the configure script.
3. Consistently use the whitespace substitution [\t ] throughout.
4. Patch the buggy INCPATH of SQL plugin Qmake project files.
5. Add the 'x11' configuration variable to the qtconfig Qmake
project using the src/gui/gui.pro file as a model. This is
needed for qtconfig although not in other tools, because
the qtconfig buildconf indirectly includes qt_x11_p.h which
is dependent on X11 headers.
6. Avoid 'ld.so: fatal: hardware capability unsupported: SSE2 AMD_3DNow'
on platforms for which the config.tests/unix/[3dnow|sse2] succeed
although unsopported at run time by testing for the x86-64
instruction set at build time and regulating hardware capabilities.
7. Correctly install the desinger plugin by explicitly building it.
8. Remove custom plugin installation logic which is unnecessary.
9. Correct removal of temporary paths from shared object files.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.dhcpd -- Run-Commands
4 ##
6 %config
7 dhcpd_enable="$openpkg_rc_def"
8 dhcpd_flags="-q"
9 dhcpd_if=""
10 dhcpd_port="67"
11 dhcpd_log_prolog="true"
12 dhcpd_log_epilog="true"
13 dhcpd_log_numfiles="10"
14 dhcpd_log_minsize="1M"
15 dhcpd_log_complevel="9"
17 %common
18 dhcpd_pidfile="@l_prefix@/var/dhcpd/run/dhcpd.pid"
19 dhcpd_leases="@l_prefix@/var/dhcpd/db/dhcpd.leases"
20 dhcpd_signal () {
21 [ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile`
22 }
23 dhcpd_start () {
24 if [ ! -f $dhcpd_leases ]; then
25 touch $dhcpd_leases
26 chmod 644 $dhcpd_leases
27 chown @l_susr@:@l_mgrp@ $dhcpd_leases
28 fi
29 local cmd="@l_prefix@/sbin/dhcpd"
30 cmd="$cmd $dhcpd_flags"
31 echo ".$dhcpd_flags" | grep -- -p >/dev/null 2>&1
32 if [ $? -ne 0 -a ".$dhcpd_port" != . ]; then
33 cmd="$cmd -p $dhcpd_port"
34 fi
35 if [ $# -gt 0 ]; then
36 cmd="$cmd $@"
37 fi
38 cmd="$cmd >/dev/null 2>&1"
39 eval $cmd
40 }
42 %status -u @l_susr@ -o
43 dhcpd_usable="unknown"
44 dhcpd_active="no"
45 dhcpd_start -q -t || dhcpd_usable="no"
46 [ ".$dhcpd_if" = . ] && dhcpd_usable="no"
47 rcService dhcpd enable yes && \
48 dhcpd_signal 0 && dhcpd_active="yes"
49 echo "dhcpd_enable=\"$dhcpd_enable\""
50 echo "dhcpd_usable=\"$dhcpd_usable\""
51 echo "dhcpd_active=\"$dhcpd_active\""
53 %start -u @l_susr@
54 rcService dhcpd enable yes || exit 0
55 rcService dhcpd usable no && exit 0
56 rcService dhcpd active yes && exit 0
57 dhcpd_start $dhcpd_if
59 %stop -u @l_susr@
60 rcService dhcpd enable yes || exit 0
61 rcService dhcpd active no && exit 0
62 dhcpd_signal TERM
63 sleep 2
64 rm -f $dhcpd_pidfile 2>/dev/null || true
66 %restart -u @l_susr@
67 rcService dhcpd enable yes || exit 0
68 rcService dhcpd active no && exit 0
69 rc dhcpd stop start
71 %reload -u @l_susr@
72 rcService dhcpd enable yes || exit 0
73 dhcpd_signal HUP
75 %daily -u @l_susr@
76 rcService dhcpd enable yes || exit 0
77 rcTmp -i
78 hintfile=`rcTmp -f -n hint`
79 for tool in dhcpd dhclient dhrelay omshell; do
80 shtool rotate -f \
81 -n $dhcpd_log_numfiles -s $dhcpd_log_minsize -d \
82 -z $dhcpd_log_complevel -m 644 -o @l_susr@ -g @l_mgrp@ \
83 -P "$dhcpd_log_prolog" \
84 -E "$dhcpd_log_epilog; echo 1 >$hintfile" \
85 @l_prefix@/var/dhcpd/log/$tool.log
86 done
87 if [ -s $hintfile ]; then
88 rc dhcpd restart
89 fi
90 rcTmp -k