--- cdtool-2.1.6/Makefile.in.orig 2004-07-29 19:47:39.000000000 +0200 +++ cdtool-2.1.6/Makefile.in 2004-08-01 13:02:21.478405032 +0200 @@ -42,21 +42,26 @@ build: $(PROGRAMS) install: install-files install-links -install-files: - $(INSTALL) cdctrl $(bindir) -o root - $(INSTALL) cdloop $(bindir) -o root - $(INSTALL) cdadd $(bindir) -o root - $(INSTALL) cdown $(bindir) -o root - - $(INSTALL) cdown.1 $(mandir)/man1 - $(INSTALL) cdtool.1 $(bindir)/man1 - $(INSTALL) cdctrl.1 $(bindir)/man1 - $(INSTALL) cdloop.1 $(bindir)/man1 +install-dirs: + $(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(libdir) + $(INSTALL) -d $(DESTDIR)$(mandir)/man1 + +install-files: install-dirs + $(INSTALL) cdctrl $(DESTDIR)$(bindir) + $(INSTALL) cdloop $(DESTDIR)$(bindir) + $(INSTALL) cdadd $(DESTDIR)$(bindir) + $(INSTALL) cdown $(DESTDIR)$(bindir) + + $(INSTALL) cdown.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) cdtool.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) cdctrl.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) cdloop.1 $(DESTDIR)$(mandir)/man1 - $(INSTALL) -d $(libdir)/cdtool -o root -g root -m 0755 - $(INSTALL) cdtool $(libdir)/cdtool -o root + $(INSTALL) -d $(DESTDIR)$(libdir)/cdtool -m 0755 + $(INSTALL) cdtool $(DESTDIR)$(libdir)/cdtool -LINKTARGET = ../lib/cdtool/cdtool +LINKTARGET = $(libdir)/cdtool/cdtool LINKS = cdplay cdpause cdstop cdclose cdeject cdir cdinfo cdreset \ cdvolume cdshuffle @@ -64,13 +69,14 @@ install-links-local: bindir = . install-links-local: install-links -install-links: +install-links: install-dirs for command in $(LINKS); do \ - if test -e $(bindir)/$$command || test -h $(bindir)/$$command; then\ - echo $(bindir)/$$command exists; \ + if test -e $(DESTDIR)$(bindir)/$$command || test -h $(DESTDIR)$(bindir)/$$command; then\ + echo $(DESTDIR)$(bindir)/$$command exists; \ continue; \ fi; \ - ln -s $(LINKTARGET) $(bindir)/$$command; \ + ln -s $(LINKTARGET) $(DESTDIR)$(bindir)/$$command; \ + echo ".so cdtool.1" > $(DESTDIR)$(mandir)/man1/$${command}.1; \ done clean: