summaryrefslogtreecommitdiff
path: root/source/ap/workbone/workbone_2.40-3.diff
blob: ed32b2695cbb6e5c243317bdd66b30e4691156d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
--- workbone-2.40.orig/hardware.c
+++ workbone-2.40/hardware.c
@@ -177,7 +177,7 @@
 	if (cd_fd < 0)
 	{
 
-		if ((cd_fd = open(cd_device, 0)) < 0)
+		if ((cd_fd = open(cd_device, O_RDONLY | O_NONBLOCK)) < 0)
 		{
 
 			if (errno == EACCES)
@@ -611,7 +611,7 @@
 	if (fcntl(fd, F_SETLK, &fl) < 0)
 		exit(0);
 
-	if (open(cd_device, 0) >= 0)
+	if (open(cd_device, O_RDONLY | O_NONBLOCK) >= 0)
 	{
 		brk(&end);
 		pause();
--- workbone-2.40.orig/workbone.c
+++ workbone-2.40/workbone.c
@@ -96,7 +96,7 @@
 {
 
   int sss, sel_stat, dly;
-  int fastin = FALSE;
+  int fastin = TRUE;
   int scmd = 0, tmppos = 0;
   int save_track = 1;
   fd_set rset;
@@ -166,6 +166,22 @@
   /* set graphics */
   if(play_track<0) setgraf ();
   /* check if drive is mounted (from Mark Buckaway's cdplayer code) */
+  /* link reading code from cdtool */
+
+    /* find out if the device is a link, resolve link name */
+    {
+
+    char *pszTest;
+    char caB[100];
+    int ii;
+
+    ii = readlink(cd_device, caB, sizeof(caB)-1);
+    if (ii < 0) {
+      pszTest = cd_device;
+    }else {
+      pszTest = &caB[0];
+      caB[ii] = '\0';
+    }
   if ((fp = setmntent (MOUNTED, "r")) == NULL)
     {
       fprintf (stderr, "Couldn't open %s: %s\n", MOUNTED, strerror (errno));
@@ -173,7 +189,7 @@
     }
   while ((mnt = getmntent (fp)) != NULL)
     {
-      if (strcmp (mnt->mnt_type, "iso9660") == 0)
+      if (strstr (mnt->mnt_fsname, pszTest) != NULL)
 	{
 	  fputs ("CDROM already mounted. Operation aborted.\n", stderr);
 	  endmntent (fp);
@@ -181,6 +197,7 @@
 	}
     }
   endmntent (fp);
+    } /* end mount checking block */
 
   /*  display control panel template */
   if(play_track<0) control_panel ();
--- workbone-2.40.orig/debian/README.debian
+++ workbone-2.40/debian/README.debian
@@ -0,0 +1,14 @@
+workbone for DEBIAN
+----------------------
+
+Workbone for Debian is a nice CD player. I've created a login called
+cdplay that has workman as its shell. That way I can enjoy the
+benefits of workman without the security hassle of leaving a virtual
+console open. 
+
+Stephen Pitts <pitts2@memphisonline.com>, Tue, 29 Oct 1996 18:27:01 -0600
+
+Workbone no longer has a delay at startup. This was annoying and seems to
+serve no purpose with modern cdroms.
+
+Martin Mitchell <martin@debian.org>
--- workbone-2.40.orig/debian/changelog
+++ workbone-2.40/debian/changelog
@@ -0,0 +1,64 @@
+workbone (2.40-3) unstable; urgency=low
+
+  * Update to standards version 3.5.6.
+  * Update copyright file.
+  * Fix typo in package description. (closes: #125506)
+  * Add symlink to doc directory. (closes: #58785)
+  * Add open nonblocking patch from Chris Waters. (closes: #88641)
+
+ -- Martin Mitchell <martin@debian.org>  Thu, 25 Apr 2002 00:45:59 +1000
+
+workbone (2.40-2) unstable; urgency=low
+
+  * Update to standards version 3.0.1.
+  * Update copyright file.
+  * Fix cd mounted detection to ignore iso9660 fs. (closes: #32056, #33973)
+
+ -- Martin Mitchell <martin@debian.org>  Fri, 22 Oct 1999 03:04:38 +1000
+
+workbone (2.40-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update copyright file.
+  * Update to standards version 2.4.1.
+  * Clean up rules file.
+
+ -- Martin Mitchell <martin@debian.org>  Wed, 14 Oct 1998 02:11:49 +1000
+
+workbone (2.31-5) unstable; urgency=low
+
+  * Libc6 compile.
+  * Remove startup delay. (#10958)
+  * New maintainer.
+
+ -- Martin Mitchell <martin@debian.org>  Tue, 11 Nov 1997 02:17:24 +1100
+
+workbone (2.31-4) unstable; urgency=low
+
+  * Added a postinst to let you know if you have a /dev/cdrom
+  * Closed all pending bugs
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Sat, 16 Nov 1996 13:27:57 -0600
+
+workbone (2.31-3) unstable; urgency=low
+
+  * Changed architecture from i386 to any
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Mon, 11 Nov 1996 20:02:03 -0600
+
+workbone (2.31-2) unstable; urgency=low
+
+  * Workbone was installed as /usr/bin instead of in /usr/bin. Whoops!
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Fri, 8 Nov 1996 20:39:05 -0600
+
+workbone (2.31-1) unstable; urgency=low
+ 
+  * Version number incremented because of questionable handling of epoch
+     by dpkg/dselect
+  * New maintainer
+  * Package rebuilt from upstream sources using deb-make!
+
+ -- Stephen Pitts <pitts2@memphisonline.com>  Tue, 29 Oct 1996 18:27:01 -0600
+
+
--- workbone-2.40.orig/debian/control
+++ workbone-2.40/debian/control
@@ -0,0 +1,14 @@
+Source: workbone
+Section: sound
+Priority: optional
+Maintainer: Martin Mitchell <martin@debian.org>
+Standards-Version: 3.5.6
+
+Package: workbone
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: cdtool
+Description: A simple text-based CD player
+ Workbone is a simple, curses-based CD player that is controlled by
+ the num-lock keys. The cdtool package can be used to determine the
+ contents of a CD before playing it.  
--- workbone-2.40.orig/debian/copyright
+++ workbone-2.40/debian/copyright
@@ -0,0 +1,11 @@
+This package was debianized by Stephen Pitts pitts2@memphisonline.com on
+Tue, 29 Oct 1996 18:27:01 -0600.
+
+It was downloaded from ftp.ibiblio.org:/pub/linux/apps/sound/cdrom/curses
+
+This package is now maintained by Martin Mitchell <martin@debian.org>.
+
+Copyright:
+
+workbone is copyrighted under the GNU General Public License,
+version 2. A copy can be found in /usr/share/common-licenses/GPL.
--- workbone-2.40.orig/debian/rules
+++ workbone-2.40/debian/rules
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+# Sample debian.rules file - for GNU Hello (1.3).
+# Copyright 1994,1995 by Ian Jackson.
+# I hereby give you perpetual unlimited permission to copy,
+# modify and relicense this file, provided that you do not remove
+# my name from the file itself.  (I assert my moral right of
+# paternity under the Copyright, Designs and Patents Act 1988.)
+# This file may have to be extensively modified
+
+package=workbone
+STRIP=strip --strip-unneeded --remove-section=.note --remove-section=.comment
+
+build:
+	$(checkdir)
+	make CFLAGS="-O2 -g" LDFLAGS=""
+	touch build
+
+clean:
+	$(checkdir)
+	-rm -f build
+	make clean
+	-rm -rf *~ debian/tmp debian/*~ debian/files debian/substvars
+
+binary-indep:	checkroot build
+	$(checkdir)
+# There are no architecture-independent files to be uploaded
+# generated by this package.  If there were any they would be
+# made here.
+
+binary-arch:	checkroot build
+	$(checkdir)
+	-rm -rf debian/tmp
+	install -d debian/tmp/DEBIAN debian/tmp/usr/share/man/man1 debian/tmp/usr/share/doc/workbone debian/tmp/usr/bin
+	install -m 0755 workbone debian/tmp/usr/bin/workbone
+	$(STRIP) debian/tmp/usr/bin/workbone
+	install -m 0644 workbone.1 debian/tmp/usr/share/man/man1
+	gzip -9v debian/tmp/usr/share/man/man1/*
+	install -m 0644 CHANGES README debian/README.debian debian/tmp/usr/share/doc/workbone
+	install -m 0644 debian/changelog debian/tmp/usr/share/doc/workbone/changelog.Debian
+	gzip -9v debian/tmp/usr/share/doc/workbone/*
+	( cd debian/tmp/usr/share/doc/workbone && ln -s CHANGES.gz changelog.gz )
+	install -m 0644 debian/copyright debian/tmp/usr/share/doc/workbone
+	install -m 0755 debian/postinst debian/tmp/DEBIAN
+	dpkg-shlibdeps debian/tmp/usr/bin/workbone
+
+        # Manage /usr/share/doc/* -> /usr/doc/* links
+	for name in workbone; \
+	do \
+		sed -e "s/PKG/$$name/g" debian/postinst > debian/$$name.postinst ; \
+		sed -e "s/PKG/$$name/g" debian/prerm > debian/$$name.prerm ; \
+		install -m 0755 debian/$$name.postinst debian/tmp/DEBIAN/postinst ; \
+		install -m 0755 debian/$$name.prerm debian/tmp/DEBIAN/prerm ; \
+		rm -f debian/$$name.postinst debian/$$name.prerm; \
+	done
+
+	dpkg-gencontrol -isp
+	chown -R root.root debian/tmp
+	chmod -R g-ws debian/tmp
+	dpkg --build debian/tmp ..
+
+define checkdir
+	test -f debian/rules
+endef
+
+# Below here is fairly generic really
+
+binary:		binary-indep binary-arch
+
+source diff:
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+checkroot:
+	$(checkdir)
+	test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
--- workbone-2.40.orig/debian/postinst
+++ workbone-2.40/debian/postinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+	if [ -d /usr/doc -a ! -e /usr/doc/PKG -a -d /usr/share/doc/PKG ]
+	then
+		ln -sf ../share/doc/PKG /usr/doc/PKG
+	fi
+fi
+
+if [ ! -e /dev/cdrom ]
+then
+echo "Please link /dev/cdrom to your CDROM device before running workbone."
+fi
--- workbone-2.40.orig/debian/prerm
+++ workbone-2.40/debian/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/PKG ]
+then
+	rm -f /usr/doc/PKG
+fi