1SUBDIRS = pixman demos test 2 3pkgconfigdir=$(libdir)/pkgconfig 4pkgconfig_DATA=pixman-1.pc 5 6$(pkgconfig_DATA): pixman-1.pc.in 7 8snapshot: 9 distdir="$(distdir)-`date '+%Y%m%d'`"; \ 10 test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \ 11 $(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist 12 13GPGKEY=3892336E 14USERNAME=$$USER 15RELEASE_OR_SNAPSHOT = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi) 16RELEASE_CAIRO_HOST = $(USERNAME)@cairographics.org 17RELEASE_CAIRO_DIR = /srv/cairo.freedesktop.org/www/$(RELEASE_OR_SNAPSHOT)s 18RELEASE_CAIRO_URL = https://cairographics.org/$(RELEASE_OR_SNAPSHOT)s 19RELEASE_XORG_URL = https://www.x.org/releases/individual/lib 20RELEASE_XORG_HOST = $(USERNAME)@xorg.freedesktop.org 21RELEASE_XORG_DIR = /srv/xorg.freedesktop.org/archive/individual/lib 22RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org, xorg-announce@lists.freedesktop.org, pixman@lists.freedesktop.org 23 24EXTRA_DIST = \ 25 Makefile.win32 \ 26 Makefile.win32.common \ 27 meson.build \ 28 meson_options.txt \ 29 neon-test.S \ 30 arm-simd-test.S \ 31 $(NULL) 32 33tar_gz = $(PACKAGE)-$(VERSION).tar.gz 34tar_xz = $(PACKAGE)-$(VERSION).tar.xz 35 36sha512_tgz = $(tar_gz).sha512 37sha256_tgz = $(tar_gz).sha256 38 39sha512_txz = $(tar_xz).sha512 40sha256_txz = $(tar_xz).sha256 41 42gpg_file = $(sha512_tgz).asc 43 44$(sha512_tgz): $(tar_gz) 45 sha512sum $^ > $@ 46 47$(sha256_tgz): $(tar_gz) 48 sha256sum $^ > $@ 49 50$(sha512_txz): $(tar_xz) 51 sha512sum $^ > $@ 52 53$(sha256_txz): $(tar_xz) 54 sha256sum $^ > $@ 55 56$(gpg_file): $(sha512_tgz) 57 @echo "Please enter your GPG password to sign the checksum." 58 gpg --armor --sign $^ 59 60HASHFILES = $(sha512_tgz) $(sha512_txz) $(sha256_tgz) $(sha256_txz) 61 62release-verify-newer: 63 @echo -n "Checking that no $(VERSION) release already exists at $(RELEASE_XORG_HOST)..." 64 @ssh $(RELEASE_XORG_HOST) test ! -e $(RELEASE_XORG_DIR)/$(tar_gz) \ 65 || (echo "Ouch." && echo "Found: $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)/$(tar_gz)" \ 66 && echo "Refusing to try to generate a new release of the same name." \ 67 && false) 68 @ssh $(RELEASE_CAIRO_HOST) test ! -e $(RELEASE_CAIRO_DIR)/$(tar_gz) \ 69 || (echo "Ouch." && echo "Found: $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)/$(tar_gz)" \ 70 && echo "Refusing to try to generate a new release of the same name." \ 71 && false) 72 @echo "Good." 73 74release-remove-old: 75 $(RM) $(tar_gz) $(tar_xz) $(HASHFILES) $(gpg_file) 76 77ensure-prev: 78 @if [[ "$(PREV)" == "" ]]; then \ 79 echo "" && \ 80 echo "You must set the PREV variable on the make command line to" && \ 81 echo "the last version." && \ 82 echo "" && \ 83 echo "For example:" && \ 84 echo " make PREV=0.7.3" && \ 85 echo "" && \ 86 false; \ 87 fi 88 89release-check: ensure-prev release-verify-newer release-remove-old distcheck 90 91release-tag: 92 git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION) 93 94release-upload: release-check $(tar_gz) $(tar_xz) $(sha512_tgz) $(sha512_txz) $(sha256_tgz) $(gpg_file) 95 scp $(tar_gz) $(sha512_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR) 96 scp $(tar_gz) $(tar_xz) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR) 97 ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)" 98 99RELEASE_TYPE = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo "stable release in the" ; else echo "development snapshot leading up to a stable"; fi) 100 101release-publish-message: $(HASHFILES) ensure-prev 102 @echo "Please follow the instructions in RELEASING to push stuff out and" 103 @echo "send out the announcement mails. Here is the excerpt you need:" 104 @echo "" 105 @echo "Lists: $(RELEASE_ANNOUNCE_LIST)" 106 @echo "Subject: [ANNOUNCE] $(PACKAGE) release $(VERSION) now available" 107 @echo "============================== CUT HERE ==============================" 108 @echo "A new $(PACKAGE) release $(VERSION) is now available. This is a $(RELEASE_TYPE)" 109 @echo "" 110 @echo "tar.gz:" 111 @echo " $(RELEASE_CAIRO_URL)/$(tar_gz)" 112 @echo " $(RELEASE_XORG_URL)/$(tar_gz)" 113 @echo "" 114 @echo "tar.xz:" 115 @echo " $(RELEASE_XORG_URL)/$(tar_xz)" 116 @echo "" 117 @echo "Hashes:" 118 @echo -n " SHA256: " 119 @cat $(sha256_tgz) 120 @echo -n " SHA256: " 121 @cat $(sha256_txz) 122 @echo -n " SHA512: " 123 @cat $(sha512_tgz) 124 @echo -n " SHA512: " 125 @cat $(sha512_txz) 126 @echo "" 127 @echo "GPG signature:" 128 @echo " $(RELEASE_CAIRO_URL)/$(gpg_file)" 129 @echo " (signed by`gpg --list-keys $(GPGKEY) | grep uid | cut -b4- | tr -s " "`)" 130 @echo "" 131 @echo "Git:" 132 @echo " https://gitlab.freedesktop.org/pixman/pixman.git" 133 @echo " tag: $(PACKAGE)-$(VERSION)" 134 @echo "" 135 @echo "Log:" 136 @git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80 137 @echo "============================== CUT HERE ==============================" 138 @echo "" 139 140release-publish: release-upload release-tag release-publish-message 141 142.PHONY: release-upload release-publish release-publish-message release-tag 143