--- ascdc-0.3.orig/Imakefile +++ ascdc-0.3/Imakefile @@ -1,5 +1,5 @@ -XPMLIB = -L/usr/lib/X11 -lXpm +XPMLIB = -L/usr/X11R6/lib -lXpm DEPLIBS = $(DEPXLIB) LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) @@ -9,4 +9,4 @@ SRCS = ascdc.cpp OBJS = ascdc.o -ComplexProgramTarget(ascdc) +ComplexProgramTargetNoMan(ascdc) --- ascdc-0.3.orig/README +++ ascdc-0.3/README @@ -27,7 +27,7 @@ chmod a+s ascdc I suggest putting ascdc in your Wharf- -*Wharf - - Swallow "ascdc" /usr/local/bin/ascdc -d /dev/hdd & +*Wharf - - Swallow "ascdc" ascdc -d /dev/cdrom & --- ascdc-0.3.orig/ascdc.c +++ ascdc-0.3/ascdc.c @@ -27,7 +27,6 @@ #include #include #include -#include /* #include */ #include @@ -79,7 +78,7 @@ char *Geometry = 0; char device[128]=DEFAULTDEVICE; -char cdplayer[128]="/usr/local/bin/xmcd"; +char cdplayer[128]="/usr/X11R6/bin/xmcd"; int autoplay=FALSE char mountdir[128]=""; @@ -129,7 +128,12 @@ } /* load */ - status += ioctl (fd, CDROM_SELECT_DISC, slot); + + if (ioctl (fd, CDROM_CHANGER_NSLOTS) < 0) + status += ioctl (fd, CDROM_SELECT_DISC, slot); + else + status += ioctl (fd, CDROM_SELECT_DISC, slot) < 0; + if (status != 0) { fprintf (stderr, "%s: CDROM_SELECT_DISC ioctl failed for ascdc: %s\n", @@ -329,19 +333,19 @@ continue; case 'm' : - if(i++ >= argc) Help(); + if(++i >= argc) Help(); strcpy(mountdir, argv[i]); mounton=TRUE; continue; case 'c' : - if(i++ >=argc) Help(); + if(++i >=argc) Help(); strcpy(cdplayer, argv[i]); strcat(cdplayer, " &"); fprintf(stdout, "cdplayer: %s\n,", cdplayer); autoplay=TRUE; continue; case 'n' : - if(i++ >=argc) Help(); + if(++i >=argc) Help(); swapcd(atoi(argv[i])); continue; case 'h': /* Help */ --- ascdc-0.3.orig/ascdc.man +++ ascdc-0.3/ascdc.man @@ -0,0 +1,28 @@ +.TH ASCDC "1" "February 2006" "ascdc 0.3" "User Commands" +.SH NAME +ascdc \- AfterStep CD changer +.SH SYNOPSIS +.B ascdc +[\fI-options \fR...] +.SH DESCRIPTION +`ascdc' is an AfterStep CD changer. +.TP +\fB\-g\fR +Geometry. Standard X Location +.TP +\fB\-d\fR +Device. default value is /dev/hdd. IDE Device of the Changer +.TP +\fB\-c\fR +cdplayer. Location of program to launch for audio CDs. +.TP +\fB\-n\fR +Number to set now. If set, switches to slot 0 on launch. +.TP +\fB\-m\fR +Mount/Umount Directory. If desired umounts & mounts, eg /cdrom or /mnt +.TP +\fB\-w\fR +Withdrawn. Starts window in Withdrawn State (for WindowMaker) +.SH AUTHOR +Rob Malda \- malda@cs.hope.edu --- ascdc-0.3.orig/debian/changelog +++ ascdc-0.3/debian/changelog @@ -0,0 +1,103 @@ +ascdc (0.3-15) unstable; urgency=low + + * Fixed bad argument handling causing crash in some cases (closes: #715649) + + -- Fredrik Hallenberg Sun, 28 Jul 2013 13:39:04 +0200 + +ascdc (0.3-14) unstable; urgency=low + + * Build-depnd on xutils-dev instead of xutils (closes: #485194) + + -- Fredrik Hallenberg Sun, 08 Jun 2008 19:46:24 +0200 + +ascdc (0.3-13) unstable; urgency=low + + * Fixed broken build (closes: #366829) + + -- Fredrik Hallenberg Sat, 13 May 2006 12:03:33 +0200 + +ascdc (0.3-12) unstable; urgency=low + + * Added man page from Emfox Zhou (closes: #351416) + + -- Fredrik Hallenberg Mon, 13 Feb 2006 22:18:44 +0100 + +ascdc (0.3-11) unstable; urgency=low + + * Fix build-depends (closes: #346731) + + -- Fredrik Hallenberg Sat, 14 Jan 2006 18:24:29 +0100 + +ascdc (0.3-10) unstable; urgency=low + + * Fixed imakefile (closes: #123735) + + -- Fredrik Hallenberg Wed, 2 Jan 2002 23:04:56 +0100 + +ascdc (0.3-9) unstable; urgency=low + + * Updated build depends (closes: #86799) + + -- Fredrik Hallenberg Wed, 21 Feb 2001 23:26:03 +0100 + +ascdc (0.3-8) unstable; urgency=low + + * Fixed build depends (closes: #70152) + + -- Fredrik Hallenberg Thu, 31 Aug 2000 10:20:07 +0200 + +ascdc (0.3-7) unstable; urgency=low + + * Applied patch from Volker Ossenkopf + Fix problems with newer kernels. (closes: #52846) + * Bumped standards version. + + -- Fredrik Hallenberg Sat, 18 Dec 1999 03:18:13 +0100 + +ascdc (0.3-6) unstable; urgency=low + + * Applied patch from Konstantinos Margaritis + so that ascdc builds on Linux 2.2. (bug #38954) + * Updated rules-file. + * Updated copyright-file. + + -- Fredrik Hallenberg Sat, 25 Apr 1998 15:37:21 +0200 + +ascdc (0.3-5) unstable; urgency=low + + * New maintainer + * Updated package description (bug #18877) + * Updated to standards version 2.4.0.0 + * Moved manpage + + -- Fredrik Hallenberg Fri, 3 Apr 1998 18:48:53 +0200 + +ascdc (0.3-4) unstable; urgency=low + + * Rebuilt with xpm4g. + + -- David Engel Mon, 15 Sep 1997 08:57:23 -0500 + +ascdc (0.3-3) unstable; urgency=low + + * Converted to libc6. + + -- David Engel Tue, 9 Sep 1997 11:51:06 -0500 + +ascdc (0.3-2) unstable; urgency=low + + * Fixed description (Bug#11996). + + -- David Engel Sat, 9 Aug 1997 20:35:39 -0500 + +ascdc (0.3-1) unstable; urgency=low + + * New upstream version. + + -- David Engel Mon, 23 Jun 1997 21:27:22 -0500 + +ascdc (0.2-1) unstable; urgency=low + + * Initial Release for Debian. + + -- David Engel Thu, 29 May 1997 19:46:38 -0500 --- ascdc-0.3.orig/debian/compat +++ ascdc-0.3/debian/compat @@ -0,0 +1 @@ +7 --- ascdc-0.3.orig/debian/control +++ ascdc-0.3/debian/control @@ -0,0 +1,15 @@ +Source: ascdc +Section: sound +Priority: optional +Maintainer: Fredrik Hallenberg +Standards-Version: 3.9.4 +Build-Depends: debhelper (>=7), libx11-dev, libxext-dev, libxpm-dev, xutils-dev + +Package: ascdc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: xmcd +Description: AfterStep CD changer + ascdc is a small CD changer. It follows the look and feel of the + AfterStep window manager and is ideally suited to be run within + AfterStep's Wharf module. --- ascdc-0.3.orig/debian/copyright +++ ascdc-0.3/debian/copyright @@ -0,0 +1,9 @@ +This package was debianized by David Engel . + +It was downloaded from +http://www.cs.hope.edu/~malda/linux/dl/ascdc-0.3.tar.gz + +Copyright: + + ascdc is copyright(c) 1997 Rob Malda. + No guarantees. Freely distributable. --- ascdc-0.3.orig/debian/rules +++ ascdc-0.3/debian/rules @@ -0,0 +1,60 @@ +#!/usr/bin/make -f + +DPKG_EXPORT_BUILDFLAGS=1 +include /usr/share/dpkg/buildflags.mk + +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp +build-stamp: + dh_testdir + + xmkmf + make CDEBUGFLAGS="$(CFLAGS) $(LDFLAGS)" + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + [ ! -f Makefile ] || make clean + -rm -f Makefile + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + make install DESTDIR=`pwd`/debian/ascdc + + touch install-stamp + +binary-indep: build install +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs README + dh_installchangelogs + dh_installman ascdc.man + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Below here is fairly generic really + +binary: binary-indep binary-arch +.PHONY: build binary binary-arch binary-indep clean install +