From: | "Matthew Marlow (mattm)" <mattm@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-misc/hylafaxplus/files: ldconfig-patch hylafaxplus-conf hylafaxplus-init |
Date: | Thu, 05 Apr 2012 17:58:00 |
Message-Id: | 20120405175740.4E4EF2004C@flycatcher.gentoo.org |
1 | mattm 12/04/05 17:57:40 |
2 | |
3 | Added: ldconfig-patch hylafaxplus-conf hylafaxplus-init |
4 | Log: |
5 | New package, hylafax plus, that is based on upstream fork of hylafax. Initial ebuilds were user submitted (Thanks to all those who contributed to bug 168890). I have made a number of modifications/fixes and have removed all keywords(package is masked). Ebuild now gets through repoman w/o any qa concerns but I will need to continue to revise it until it is ready to keyword as ~amd64 and ~x86 for user testing. |
6 | |
7 | (Portage version: 2.1.10.55/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 net-misc/hylafaxplus/files/ldconfig-patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/ldconfig-patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/ldconfig-patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: ldconfig-patch |
16 | =================================================================== |
17 | --- faxd/Makefile.LINUXdso.original 2011-12-30 18:17:59.000000000 +0100 |
18 | +++ faxd/Makefile.LINUXdso 2011-12-30 18:18:51.000000000 +0100 |
19 | @@ -37,7 +37,6 @@ |
20 | |
21 | installDSO: libfaxserver.${DSO} |
22 | ${PUTSERV} -root ${INSTALLROOT} -F ${LIBDIR} -m 755 -O libfaxserver.${DSO} |
23 | - [ `id -u` -eq 0 ] && ( PATH=${PATH}:/sbin ldconfig ${LIBDIR} ) || ( echo "ldconfig is required to be run as user root at install time" ) |
24 | |
25 | uninstallDSO:: |
26 | ${RM} -f ${LIBDIR}/libfaxserver.${DSO} |
27 | |
28 | |
29 | |
30 | 1.1 net-misc/hylafaxplus/files/hylafaxplus-conf |
31 | |
32 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/hylafaxplus-conf?rev=1.1&view=markup |
33 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/hylafaxplus-conf?rev=1.1&content-type=text/plain |
34 | |
35 | Index: hylafaxplus-conf |
36 | =================================================================== |
37 | # Spool directory for HylaFAX |
38 | spooldir="/var/spool/fax" |
39 | |
40 | # Faxq program path |
41 | faxq="/usr/sbin/faxq" |
42 | |
43 | # hfaxd program path |
44 | hfaxd="/usr/sbin/hfaxd" |
45 | |
46 | # faxgetty program path |
47 | faxgetty="/usr/sbin/faxgetty" |
48 | |
49 | # Port of the hfaxd daemon for new protocol |
50 | faxport=hylafax |
51 | |
52 | # Address used by hfaxd as binding address. |
53 | faxbind="127.0.0.1" |
54 | |
55 | # Port of the hfaxd daemon for SNPP protocol |
56 | snppport=444 |
57 | |
58 | # Port of the hfaxd daemon for old protocol |
59 | oldprotoport=4557 |
60 | |
61 | # newproto | oldproto | snpp | any |
62 | mode="newproto" |
63 | |
64 | # Directory where the pidfiles of HylaFAX are saved. |
65 | piddir="/var/run" |
66 | |
67 | |
68 | |
69 | 1.1 net-misc/hylafaxplus/files/hylafaxplus-init |
70 | |
71 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/hylafaxplus-init?rev=1.1&view=markup |
72 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/hylafaxplus/files/hylafaxplus-init?rev=1.1&content-type=text/plain |
73 | |
74 | Index: hylafaxplus-init |
75 | =================================================================== |
76 | #!/sbin/runscript |
77 | # Copyright 1999-2012 Gentoo Foundation |
78 | # Author Geaaru |
79 | # Distributed under the terms of the GNU General Public License v2 |
80 | |
81 | opts="zap" |
82 | |
83 | depend() { |
84 | use lo |
85 | } |
86 | |
87 | checkconfig() { |
88 | ebegin "Check hylafax server configuration..." |
89 | |
90 | if [ x$spooldir == x ] ; then |
91 | eerror "No spooldir directory defined" |
92 | return 1 |
93 | else |
94 | SPOOL=$spooldir |
95 | einfo "Use spool directory $SPOOL" |
96 | fi |
97 | |
98 | if [ x$mode == x ] ; then |
99 | eerror "No mode defined" |
100 | return 1 |
101 | fi |
102 | |
103 | if [ ! -f $SPOOL/etc/setup.cache ] ; then |
104 | eerror "No $SPOOL/etc/setup.cache file founded. Use faxsetup command" |
105 | return 1 |
106 | fi |
107 | |
108 | if [[ x$hfaxd == x || ! -f $hfaxd ]] ; then |
109 | eerror "No hfaxd daemon founded" |
110 | return 1 |
111 | fi |
112 | |
113 | if [[ x$faxq == x || ! -f $faxq ]] ; then |
114 | eerror "No faxq program founded" |
115 | return 1 |
116 | fi |
117 | |
118 | if [[ x$faxgetty == x || ! -f $faxgetty ]] ; then |
119 | eerror "No faxgetty program founded" |
120 | return 1 |
121 | fi |
122 | |
123 | if [ x$faxbind == x ] ; then |
124 | eerror "No binding address supply" |
125 | return 1 |
126 | fi |
127 | |
128 | if [ x$piddir == x ] ; then |
129 | PIDDIR=$SPOOL |
130 | else |
131 | PIDDIR=$piddir |
132 | fi |
133 | |
134 | |
135 | hfaxd_args="-l $faxbind -q $SPOOL" |
136 | |
137 | case $mode in |
138 | newproto) |
139 | if [[ x$faxport == x ]] ; then |
140 | eerror "No faxport defined" |
141 | return 1 |
142 | fi |
143 | hfaxd_args="$hfaxd_args -i $faxport" |
144 | ;; |
145 | oldproto) |
146 | if [[ x$oldprotoport == x ]] ; then |
147 | eerror "No oldprotoport defined" |
148 | return 1 |
149 | fi |
150 | hfaxd_args="$hfaxd_args -o $oldprotoport" |
151 | ;; |
152 | snpp) |
153 | if [[ x$snppport == x ]] ; then |
154 | eerror "No snppport defined" |
155 | return 1 |
156 | fi |
157 | hfaxd_args="$hfaxd_args -s $snppport" |
158 | ;; |
159 | any) |
160 | if [[ x$faxport == x || x$snppport == x || x$oldprotoport == x ]] ; then |
161 | eerror "No port data founded for old services" |
162 | return 1 |
163 | fi |
164 | hfaxd_args="$hfaxd_args -i $faxport -s $snppport -o $oldprotoport" |
165 | ;; |
166 | *) |
167 | eerror "Invalid mode" |
168 | return 1 |
169 | ;; |
170 | |
171 | esac |
172 | |
173 | faxq_args="-q $SPOOL" |
174 | |
175 | # workaround for manage save of pidfile with start-stop-daemon |
176 | hfaxd_args="$hfaxd_args -d" |
177 | faxq_args="$faxq_args -D" |
178 | |
179 | return 0 |
180 | } |
181 | |
182 | start() { |
183 | local result |
184 | |
185 | checkconfig || return 1 |
186 | |
187 | ebegin "Starting HylaFAX server daemons" |
188 | |
189 | start_faxq |
190 | result=$? |
191 | |
192 | if [ $result -ne 0 ] ; then |
193 | eerror "Error on start $faxq daemon" |
194 | return 1 |
195 | fi |
196 | |
197 | start_hfaxd |
198 | result=$? |
199 | |
200 | eend $result |
201 | } |
202 | |
203 | start_hfaxd() { |
204 | local arguments="--start \ |
205 | --make-pidfile --pidfile $PIDDIR/hfaxd.pid" |
206 | |
207 | einfo "Starting $hfaxd with args $hfaxd_args" |
208 | |
209 | start-stop-daemon -b ${arguments} --exec $hfaxd -- $hfaxd_args > /dev/null 2>&1 |
210 | |
211 | return $?; |
212 | } |
213 | |
214 | start_faxq() { |
215 | local arguments="--start \ |
216 | --make-pidfile --pidfile $PIDDIR/faxq.pid" |
217 | einfo "Starting $faxq ... " |
218 | |
219 | start-stop-daemon -b ${arguments} --exec $faxq -- $faxq_args > /dev/null 2>&1 |
220 | |
221 | return $? |
222 | } |
223 | |
224 | stop() { |
225 | checkconfig || return 1 |
226 | |
227 | ebegin "Stopping HylaFAX server daemons" |
228 | |
229 | start-stop-daemon --stop --quiet --pidfile $PIDDIR/hfaxd.pid |
230 | start-stop-daemon --stop --quiet --pidfile $PIDDIR/faxq.pid |
231 | eend $? |
232 | } |
233 | |
234 | zap() { |
235 | checkconfig || return 1 |
236 | |
237 | ebegin "Zap HylaFAX server daemon files" |
238 | |
239 | if [ -f $PIDFILE/hfaxd.pid ] ; then |
240 | rm -f $PIDFILE/hfaxd.pid |
241 | fi |
242 | |
243 | if [ -f $PIDFILE/faxq.pid ] ; then |
244 | rm -f $PIDFILE/faxq.pid |
245 | fi |
246 | } |
247 | |
248 | restart() { |
249 | stop |
250 | start |
251 | } |