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
67
68
REPOSITORIES_PATH = repositories
DISTRIBUTIONS = debian
CHROOT_BASE = /var/lib/chroot
ARCHITECTURES = i386 amd64
CODE_NAMES = wheezy
all:
release: build sign-packages update-repository sign-repository upload
remove-existing-packages:
for distribution in $(DISTRIBUTIONS); do \
find $(REPOSITORIES_PATH)/$${distribution}/pool \
-type f -delete; \
done
download:
for distribution in $(DISTRIBUTIONS); do \
rsync -avz --progress --delete \
$(RSYNC_PATH)/$${distribution} $(REPOSITORIES_PATH)/; \
done
sign-packages:
./sign-packages.sh '$(GPG_UID)' '$(REPOSITORIES_PATH)/' '$(CODE_NAMES)'
update-repository:
./update-repository.sh '$(PACKAGE_NAME)' '$(REPOSITORIES_PATH)/' \
'$(ARCHITECTURES)' '$(CODE_NAMES)'
sign-repository:
./sign-repository.sh '$(GPG_UID)' '$(REPOSITORIES_PATH)/' '$(CODE_NAMES)'
ensure-rsync-path:
@if test -z "$(RSYNC_PATH)"; then \
echo "--with-rsync-path configure option must be specified."; \
false; \
fi
upload: ensure-rsync-path
for distribution in $(DISTRIBUTIONS); do \
(cd $(REPOSITORIES_PATH)/$${distribution}; \
rsync -avz --progress --delete \
dists pool $(RSYNC_PATH)/$${distribution}; \
); \
done
build: build-package-deb
build-package-deb: prepare-build-package-deb
vagrant destroy --force
for architecture in $(ARCHITECTURES); do \
for code_name in $(CODE_NAMES); do \
id=debian-$$code_name-$$architecture; \
vagrant up $$id || exit 1; \
vagrant destroy --force $$id; \
done; \
done
prepare-build-package-deb: source env.sh
cp env.sh tmp/
rm -rf tmp/debian
cp -rp $(srcdir)/../debian tmp/
source: tmp/$(PACKAGE)-$(VERSION).tar.gz
tmp/$(PACKAGE)-$(VERSION).tar.gz: $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
mkdir -p tmp
cp $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz $@