]> thyrsus.com Git - morse-classic.git/commitdiff
We can build an RPM now.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 17:16:10 +0000 (17:16 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 24 Jan 2005 17:16:10 +0000 (17:16 +0000)
Makefile
morse.spec [new file with mode: 0644]
qso/Makefile

index 4557f4e41e1fcdf77e2e672846d2ff814281ca9c..84803768af393ab18677f957536982fa3b0b8318 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,22 +38,26 @@ DEVICE = OSS
 #DEFINES = -DFULLVOLUME
 #DEFINES = 
 
+VERS=$(shell sed <morse.spec -n -e '/Version: \(.*\)/s//\1/p')
+
+BEEPERS = beepAdLib.c beepHP.c beepLinux.c beepSun.c beepIndigo.c \
+               beepOSS.c beepX11.c
+SOURCES = alarm.c  morse.c alarm.h  beep.h  $(BEEPERS)
+MANPAGES = morse.1 QSO.1 
+DOCS = README HISTORY morse.xml morse.spec $(MANPAGES)
+ALL=  $(DOCS) Makefile $(SOURCES) qso/*.[ch] qso/Makefile
+
 # The flags necessary to link with the X11 libraries.
 #X11LIBS = -L/usr/X11/lib -lX11 -lsocket -lnsl
 X11LIBS = -L/usr/X11/lib -lX11
 
-# Your favorite C compiler
-CC     = gcc
-#CC    = cc
-
 # Any additional flags your favorite C compiler requires to work.
-#CFLAGS  = -O -I/usr/X11/include -DSVR4 -DSYSV386 ${DEFINES}
-CFLAGS  = -O3 -march=i486 ${DEFINES}
+CFLAGS  = -O3 ${DEFINES}
 
 default:
        make test
 
-all: morse QSO morse.1
+all: morse QSO morse.1 QSO.1
 
 morse: morse${DEVICE}
        rm -f $@
@@ -84,7 +88,7 @@ morseOSS:     morse.o beepOSS.o
        $(CC) $(CFLAGS) -o $@ morse.o beepOSS.o -lm
 
 QSO:
-       cd qso; make
+       cd qso && make
        ln qso/QSO ./QSO
 
 #
@@ -108,7 +112,7 @@ clean:
        cd qso; make clean
 
 pristine: clean
-       rm -f morse.1 QSO.1
+       rm -f $(MANPAGES)
 
 morse.o:       beep.h Makefile
 beepSun.o:     beep.h
@@ -122,3 +126,15 @@ alarm.o:   alarm.h
 
 morse.1: morse.xml
        xmlto man morse.xml
+
+morse-$(VERS).tar.gz: $(ALL)
+       @ls $(ALL) | sed s:^:morse-$(VERS)/: >MANIFEST
+       @(cd ..; ln -s trunk morse-$(VERS))
+       (cd ..; tar -czvf trunk/morse-$(VERS).tar.gz `cat trunk/MANIFEST`)
+       @(cd ..; rm morse-$(VERS))
+
+dist: morse-$(VERS).tar.gz
+
+release: morse-$(VERS).tar.gz morse.html
+       shipper -f; rm -f CHANGES ANNOUNCE* *.1 *.html *.rpm *.lsm MANIFEST
+
diff --git a/morse.spec b/morse.spec
new file mode 100644 (file)
index 0000000..a83db22
--- /dev/null
@@ -0,0 +1,44 @@
+Name: morse
+Summary: morse trainer program
+Version: 2.0
+Release: 1
+License: BSD
+Group: Communications
+URL: http://catb.org/~esr/morse/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-root
+
+%description
+morse is a training program for aspiring radio hams.  It can generate
+random tests or simulated QSOs resembling those used in the ARRL test
+(a QSO generator is included).  There are a plethora of options to
+vary the training method.  In one mode, it will take text input from
+standard input and render it as more beeps.
+
+%prep
+%setup -q
+
+%build
+make %{?_smp_mflags} morse QSO morse.1
+
+%install
+[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
+mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
+cp morse QSO "$RPM_BUILD_ROOT"%{_bindir}
+mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man1/
+cp morse.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/
+
+%clean
+[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
+
+%files
+%doc README HISTORY
+%defattr(-,root,root,-)
+%{_mandir}/man1/morse.1*
+%{_bindir}/morse
+%{_bindir}/QSO
+
+%changelog
+* Mon Jan 24 2005 Eric S. Raymond <esr@snark.thyrsus.com> - 
+- Initial build.  See HISTORY file for prior history.
+
index fe85ef80df641b16832d592d7f40f450f7aa9781..73685205be1ff5362a408a654b2a68f7fa94901a 100644 (file)
@@ -1,9 +1,4 @@
-# Your favorite C compiler
-CC     = gcc
-#CC    = cc
-
-# The flags your favorite C compiler requires to work.
-CFLAGS  = -O3 -m486
+CFLAGS  = -O3
 
 OBJECTS = QSO.o put_form.o make_fre.o grammar.o util.o init_str.o
 INCLUDES = antenna.h callsign.h city.h cityh.h heights.h jobs.h misc.h \