--- tleds-1.05beta10.orig/Makefile
+++ tleds-1.05beta10/Makefile
@@ -4,23 +4,26 @@
all: tleds xtleds say_install
# Where to install programs and man pages
-BINDIR = /usr/local/bin/
-MANDIR = /usr/local/man/
+PREFIX = $(DESTDIR)/usr
+BINDIR = $(PREFIX)/sbin/
+MANDIR = $(PREFIX)/share/man/
-# For 2.1.x kernels, you have to include -DKERNEL2_1 option for gcc
+# For 21.x kernels, you have to include -DKERNEL2_1 option for gcc
GCCOPTS = -D_GNU_SOURCE -O3 -Wall
# The first one is if you want to include X code
xtleds: tleds.c Makefile
# Making xtleds
- gcc $(GCCOPTS) -o xtleds tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
+ gcc $(GCCOPTS) -o xtleds_20 tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
+ gcc -DKERNEL2_1 $(GCCOPTS) -o xtleds_21 tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
# This second one works only when started in VT. Check the REMOVE_X_CODE
# in the source code.
tleds: tleds.c Makefile
# Making tleds
- gcc -DNO_X_SUPPORT $(GCCOPTS) -o tleds tleds.c
+ gcc -DNO_X_SUPPORT $(GCCOPTS) -o tleds_20 tleds.c
+ gcc -DNO_X_SUPPORT -DKERNEL2_1 $(GCCOPTS) -o tleds_21 tleds.c
help:
# make help - this.
@@ -32,30 +35,20 @@
# make all - make tleds and xtleds
strip:
- strip --strip-all tleds
- strip --strip-all xtleds
+ strip --strip-all tleds_20
+ strip --strip-all tleds_21
say_install:
# Now su root and run: make install
# If you want to strip them first, say: make strip install
-install: tleds
+install:
# EUID root needed !
# installing ....
# If you get an error here, you are not root or may have tleds running
# on the system. tleds -k first and then make install again as root.
- rm -f /usr/bin/tleds /usr/bin/xtleds /usr/man/man1/tleds.1* /usr/man/man1/xtleds.1
- cp tleds $(BINDIR)/tleds
- chgrp users $(BINDIR)/tleds
- chmod ug+x $(BINDIR)/tleds
- cp tleds.1.gz $(MANDIR)/man1/tleds.1.gz
- chmod og-wr $(BINDIR)/tleds $(MANDIR)/man1/tleds.1.gz
- chmod og+r $(MANDIR)/man1/tleds.1.gz
- ln -fs $(MANDIR)/man1/tleds.1.gz $(MANDIR)/man1/xtleds.1
- cp xtleds $(BINDIR)/xtleds
- chgrp users $(BINDIR)/xtleds
- chmod ug+x $(BINDIR)/xtleds
- chmod og-wr $(BINDIR)/xtleds
+ install -s -o root -g root -m 754 tleds_20 $(BINDIR)/tleds_20
+ install -s -o root -g root -m 754 tleds_21 $(BINDIR)/tleds_21
sync
# ....Done.