-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
68 lines (55 loc) · 1.73 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
#
# Build variables
#
SRCNAME = asl3-tts
PKGNAME = $(SRCNAME)
RELVER = 1.0.1
DEBVER = 1
RELPLAT ?= deb$(shell lsb_release -rs 2> /dev/null)
ARCH ?= $(shell uname -m)
ifeq ($(ARCH), x86_64)
BARCH = amd64
endif
ifeq ($(ARCH), aarch64)
BARCH = arm64
endif
BUILDABLES = bin piper-tts.$(ARCH) espeak-ng-data voices
ifdef ${DESTDIR}
DESTDIR=${DESTDIR}
endif
default:
@echo This does nothing, use 'make install'
install:
@echo "ARCH: $(ARCH)"
@echo "BARCH: $(BARCH)"
$(foreach dir, $(BUILDABLES), $(MAKE) -C $(dir) install;)
deb: debclean debprep
debchange --distribution stable --package $(PKGNAME) \
--newversion $(EPOCHVER)$(RELVER)-$(DEBVER).$(RELPLAT) \
"Autobuild of $(EPOCHVER)$(RELVER)-$(DEBVER) for $(RELPLAT)"
perl -pi -e 's/\@\@ARCH\@\@/$(BARCH)/g' debian/control
DEB_BUILD_OPTIONS="nostrip noautodbgsym" \
dpkg-buildpackage -b --no-sign --target-arch=$(BARCH) --target-type=$(ARCH)-linux-gnu
git checkout debian/changelog debian/control || /bin/true
debchange:
debchange --newversion $(RELVER)-$(DEBVER)
debchange --release
debprep: debclean
(cd .. && \
rm -f $(PKGNAME)-$(RELVER) && \
rm -f $(PKGNAME)-$(RELVER).tar.gz && \
rm -f $(PKGNAME)_$(RELVER).orig.tar.gz && \
ln -s $(SRCNAME) $(PKGNAME)-$(RELVER) && \
tar --exclude=".git" -h -zvcf $(PKGNAME)-$(RELVER).tar.gz $(PKGNAME)-$(RELVER) && \
ln -s $(PKGNAME)-$(RELVER).tar.gz $(PKGNAME)_$(RELVER).orig.tar.gz )
debclean:
rm -f ../$(PKGNAME)_$(RELVER)*
rm -f ../$(PKGNAME)-$(RELVER)*
rm -rf debian/$(PKGNAME)
rm -f debian/files
rm -rf debian/.debhelper/
rm -f debian/debhelper-build-stamp
rm -f debian/*.substvars
rm -rf debian/$(SRCNAME)/ debian/.debhelper/
rm -f debian/debhelper-build-stamp debian/files debian/$(SRCNAME).substvars
rm -f debian/*.debhelper