| 1 |
REPOSITORIES_PATH = repositories |
| 2 |
DISTRIBUTIONS = centos |
| 3 |
ARCHITECTURES = i386 x86_64 |
| 4 |
MYSQL_VARIANTS = \ |
| 5 |
mysql55 \ |
| 6 |
mysql56-community \ |
| 7 |
mysql57-community \ |
| 8 |
mariadb \ |
| 9 |
mariadb-10.1 \ |
| 10 |
mariadb-10.2 \ |
| 11 |
percona-server-56 \ |
| 12 |
percona-server-57 |
| 13 |
CENTOS_VERSIONS = 6 7 |
| 14 |
SPEC_DIR = $(builddir)/../rpm/centos |
| 15 |
|
| 16 |
all: |
| 17 |
|
| 18 |
release: download build sign-packages update-repository upload |
| 19 |
|
| 20 |
remove-existing-packages: |
| 21 |
for distribution in $(DISTRIBUTIONS); do \ |
| 22 |
find $${distribution} -name "*.rpm" -delete; \ |
| 23 |
done |
| 24 |
|
| 25 |
ensure-rsync-path: |
| 26 |
@if test -z "$(RSYNC_PATH)"; then \ |
| 27 |
echo "--with-rsync-path configure option must be specified."; \ |
| 28 |
false; \ |
| 29 |
fi |
| 30 |
|
| 31 |
sign-packages: |
| 32 |
./sign-rpm.sh '$(GPG_UID)' '$(REPOSITORIES_PATH)/' '$(DISTRIBUTIONS)' |
| 33 |
|
| 34 |
update-repository: |
| 35 |
./update-repository.sh '$(REPOSITORIES_PATH)/' '$(DISTRIBUTIONS)' |
| 36 |
|
| 37 |
upload: ensure-rsync-path |
| 38 |
for distribution in $(DISTRIBUTIONS); do \ |
| 39 |
rsync -avz --progress --delete --exclude .gitignore \ |
| 40 |
$(REPOSITORIES_PATH)/$${distribution}/ \ |
| 41 |
$(RSYNC_PATH)/$${distribution}; \ |
| 42 |
done |
| 43 |
|
| 44 |
download: ensure-rsync-path |
| 45 |
mkdir -p $(REPOSITORIES_PATH) |
| 46 |
for distribution in $(DISTRIBUTIONS); do \ |
| 47 |
rsync -avz --progress --delete \ |
| 48 |
$(RSYNC_PATH)/$${distribution}/ \ |
| 49 |
$(REPOSITORIES_PATH)/$${distribution}; \ |
| 50 |
done |
| 51 |
|
| 52 |
build: build-in-vm |
| 53 |
|
| 54 |
build-in-vm: source specs env.sh |
| 55 |
./build-in-vm.sh \ |
| 56 |
"$(PACKAGE)" \ |
| 57 |
"$(SPEC_DIR)" \ |
| 58 |
"$(MYSQL_VARIANTS)" \ |
| 59 |
"$(ARCHITECTURES)" \ |
| 60 |
"$(CENTOS_VERSIONS)" |
| 61 |
|
| 62 |
source: tmp/$(PACKAGE)-$(VERSION).tar.gz |
| 63 |
|
| 64 |
tmp/$(PACKAGE)-$(VERSION).tar.gz: $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz |
| 65 |
mkdir -p tmp/ |
| 66 |
cp $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz tmp/ |
| 67 |
|
| 68 |
$(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz: |
| 69 |
cd $(abs_top_builddir) && $(MAKE) dist |
| 70 |
|
| 71 |
specs: $(SPEC_DIR)/mysql55-$(PACKAGE).spec |
| 72 |
specs: $(SPEC_DIR)/mysql56-community-$(PACKAGE).spec |
| 73 |
specs: $(SPEC_DIR)/mariadb-$(PACKAGE).spec |
| 74 |
specs: $(SPEC_DIR)/mariadb-10.1-$(PACKAGE).spec |
| 75 |
specs: $(SPEC_DIR)/mariadb-10.2-$(PACKAGE).spec |
| 76 |
specs: $(SPEC_DIR)/percona-server-56-$(PACKAGE).spec |
| 77 |
specs: $(SPEC_DIR)/percona-server-57-$(PACKAGE).spec |