-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
66 lines (56 loc) · 1.58 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
NAME = ananas4
VERSION = $(shell cat VERSION)
NAMEV = $(NAME)-$(VERSION)
MAKE = make
QMAKE = qmake
MAKEFILE = Makefile
LIBDIR = $(INSTALL_ROOT)/usr/lib
BINDIR = $(INSTALL_ROOT)/usr/bin
DOCDIR = $(INSTALL_ROOT)/usr/share/doc/$(NAMEV)
INCLUDEDIR = $(INSTALL_ROOT)/usr/include/ananas
log = ~/.ananas/tests.log
#BINDIR = /usr/bin
#MANDIR = /usr/man/man8
#VARDIR = /usr/share/$(NAME)
TAR = $(HOME)/tmp/$(NAMEV)
TARGET = i586
first: all
all: Makefile
cd src && $(QMAKE) && $(MAKE)
clean:
rm -fr rpm
rm -f $(NAME).spec
rm -fr *~
rm -f translations/*.qm
cd src && $(QMAKE) && $(MAKE) clean
tr:
lrelease translations/*.ts
install:
find src doc -name Makefile -delete
$(QMAKE) src/src.pro -o src/$(MAKEFILE)
cd src && $(MAKE) install LIBDIR=$(LIBDIR) BINDIR=$(BINDIR) INCLUDEDIR=$(INCLUDEDIR) && cd ../doc && $(QMAKE) doc.pro -o $(MAKEFILE) && $(MAKE) install DOCDIR=$(DOCDIR)
uninstall:
cd src && $(MAKE) uninstall
tgz: dummy
mkdir -p rpm
mkdir -p $(TAR)
cp -r -f * $(TAR)
# cd $(TAR) && make clean
# cd $(TAR) && find src doc -name Makefile -delete
cd $(HOME)/tmp && tar cf - "$(NAMEV)/" | bzip2 -f9 > "$(HOME)/RPM/SOURCES/$(NAMEV).tar.bz2"
rm -f -r $(TAR)
srpm: tgz
if [ -e /etc/altlinux-release ] ; then\
iconv -f UTF-8 -t KOI8-R $(NAME).spec.in |\
sed s/ru_RU.UTF8/ru_RU.KOI8-R/>$(NAME).spec;\
else \
cp $(NAME).spec.in $(NAME).spec; \
fi
rpmbuild --target=$(TARGET) -bs $(NAME).spec
mv -f $(HOME)/RPM/SRPMS/$(NAME)* rpm
rpm: srpm
rpmbuild --target=$(TARGET) -bb $(NAME).spec
mv -f $(HOME)/RPM/RPMS/$(TARGET)/$(NAME)* rpm
tests: all
./tests.begin -log=$(log)
dummy: