1 VERSION
= $(shell cat fbreader
/VERSION
)
2 SOVERSION
= $(shell cat zlibrary
/SOVERSION
)
3 TMPDIR
= $(CURDIR
)/fbreader-
$(VERSION
)
6 @echo
-n
"Building $(ARCHITECTURE) $@ package..."
7 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules build
1> $(ARCHITECTURE
)-$@.log
2>&1
9 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) install 1>> $(ARCHITECTURE
)-$@.log
2>&1
10 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) package
1>> $(ARCHITECTURE
)-$@.log
2>&1
11 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules
clean 1> /dev
/null
2>&1
13 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-$@.log
17 @echo
-n
"Building $(ARCHITECTURE) $@ package..."
18 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules build
1> $(ARCHITECTURE
)-$@.log
2>&1
20 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) install 1>> $(ARCHITECTURE
)-$@.log
2>&1
21 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) package
1>> $(ARCHITECTURE
)-$@.log
2>&1
22 @make
-f
$(DIST_DIR
)/$@
/$(ARCHITECTURE
)/rules
clean 1> /dev
/null
2>&1
24 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-$@.log
28 @echo
-n
"Building $(ARCHITECTURE) debian package..."
30 @cp
-a Makefile zlibrary fbreader makefiles
$(TMPDIR
)
31 @
rm -rf
`find $(TMPDIR) -name ".svn"`
32 @mkdir
$(TMPDIR
)/debian
33 @for file in
$(DIST_DIR
)/debian
/$(ARCHITECTURE
)/*; do \
34 sed
-e
"s#@SOVERSION@#$(SOVERSION)#g" $$file | \
35 sed
-e
"s#@VERSION@#$(VERSION)#g" > $(TMPDIR
)/debian
/`basename $$file`; \
36 chmod
--reference
$$file $(TMPDIR
)/debian
/`basename $$file`; \
38 @cd
$(TMPDIR
); dpkg-buildpackage
-rfakeroot
-us
-uc
1> $(CURDIR
)/$(ARCHITECTURE
)-debian.log
2>&1; cd
$(CURDIR
)
40 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-debian.log
44 @echo
-n
"Building $(ARCHITECTURE) ipk package..."
45 @make
-f
$(DIST_DIR
)/ipk
/$(ARCHITECTURE
)/rules build
1> $(ARCHITECTURE
)-ipk.log
2>&1
46 @for controlfile in
$(DIST_DIR
)/ipk
/$(ARCHITECTURE
)/*.control
; do \
47 controlname
=`basename $$controlfile .control`; \
49 mkdir
$(TMPDIR
)/data
; \
50 make
-f
$(DIST_DIR
)/ipk
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
)/data install-
$$controlname 1>> $(ARCHITECTURE
)-ipk.log
2>&1; \
52 -e
"s#@VERSION@#$(VERSION)#" \
53 -e
"s#@SIZE@#`du -s -b $(TMPDIR)/data | cut -f1`#" \
54 $$controlfile > $(TMPDIR
)/control
; \
55 tar czf
$(TMPDIR
)/control.
tar.gz
-C
$(TMPDIR
) .
/control
; \
56 tar czf
$(TMPDIR
)/data.
tar.gz
-C
$(TMPDIR
)/data .
; \
57 echo
2.0 > $(TMPDIR
)/debian-binary
; \
58 tar czf
`egrep ^Filename: $(TMPDIR)/control | cut -d' ' -f2` -C
$(TMPDIR
) .
/debian-binary .
/control.
tar.gz .
/data.
tar.gz
; \
61 @make
-f
$(DIST_DIR
)/ipk
/$(ARCHITECTURE
)/rules
clean 1> /dev
/null
2>&1;
62 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-ipk.log
66 @echo
-n
"Building $(ARCHITECTURE) debipk package..."
67 @make
-f
$(DIST_DIR
)/debipk
/$(ARCHITECTURE
)/rules build
1> $(ARCHITECTURE
)-debipk.log
2>&1
68 @for controlfile in
$(DIST_DIR
)/debipk
/$(ARCHITECTURE
)/*.control
; do \
69 controlname
=`basename $$controlfile .control`; \
71 make
-f
$(DIST_DIR
)/debipk
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) install-
$$controlname 1>> $(ARCHITECTURE
)-debipk.log
2>&1; \
72 mkdir
$(TMPDIR
)/DEBIAN
; \
74 -e
"s#@VERSION@#$(VERSION)#" \
75 -e
"s#@SIZE@#`du -s -b $(TMPDIR) | cut -f1`#" \
76 $$controlfile > $(TMPDIR
)/DEBIAN
/control
; \
77 dpkg
-b
$(TMPDIR
) `sed "s#@VERSION@#$(VERSION)#" $(DIST_DIR)/debipk/$(ARCHITECTURE)/$$controlname.name` 1>> $(ARCHITECTURE
)-debipk.log
2>&1; \
80 @make
-f
$(DIST_DIR
)/debipk
/$(ARCHITECTURE
)/rules
clean 1> /dev
/null
2>&1
81 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-debipk.log
85 @echo
-n
"Building $(ARCHITECTURE) nsi package..."
86 @make
-f
$(DIST_DIR
)/nsi
/$(ARCHITECTURE
)/rules build
1> $(ARCHITECTURE
)-nsi.log
2>&1
88 @make
-f
$(DIST_DIR
)/nsi
/$(ARCHITECTURE
)/rules DESTDIR
=$(TMPDIR
) install 1>> $(ARCHITECTURE
)-nsi.log
2>&1
89 @sed
"s#@VERSION@#$(VERSION)#" $(DIST_DIR
)/nsi
/$(ARCHITECTURE
)/control.nsi
> $(TMPDIR
)/control.nsi
90 @cd
$(TMPDIR
); makensis control.nsi
1>> $(CURDIR
)/$(ARCHITECTURE
)-nsi.log
2>&1
92 @make
-f
$(DIST_DIR
)/nsi
/$(ARCHITECTURE
)/rules
clean 1> /dev
/null
2>&1
94 @
rm -f
$(CURDIR
)/$(ARCHITECTURE
)-nsi.log