summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: df98f211c490178925b4400d0ae9d1121667bea0 (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
version = 0.1.0

project = ldetect-lst
prefix = /usr
datadir = $(prefix)/share
dir = $(datadir)/$(project)

build: CardsNames

clean:
	rm -f *~ CardsNames

CardsNames: Cards+ Cards2CardsNames.pl
	./Cards2CardsNames.pl $< > $@

install: build
	install -d $(dir)
	(echo "# !! The original version is available in CVS at" ; \
         echo "# export CVSROOT=:pserver:anoncvs@cvs.mandrakesoft.com:/home/cvs/cooker" ; \
	 echo "# cvs login    (password ``cvs'')" ; \
         echo "# cvs checkout soft/$(project)" ; \
	 echo "#   or" ; \
         echo "# export CVSROOT=:ext:LOGIN@cvs.mandrakesoft.com:/home/cvs/cooker" ; \
         echo "# export CVS_RSH=ssh" ; \
         echo "# cvs checkout soft/$(project)" ; \
	 cat pcitable \
	) > $(dir)/pcitable

	install -m 644 Cards+ CardsNames MonitorsDB isdn.db $(dir)

rpm: clean $(RPM)
	perl -pi -e "s/^(%define version).*/\1 $(version)/" $(project).spec

	(echo "# !! DON'T MODIFY HERE, MODIFY IN THE CVS !!" ; \
	 echo "%define version $(version)" ; \
         cat $(project).spec \
        ) > $(RPM)/SPECS/$(project).spec

	(cd .. ; tar cfj $(RPM)/SOURCES/$(project).tar.bz2 $(project))
	rpm -ba --clean --rmsource --rmspec $(RPM)/SPECS/$(project).spec