Add packaging files for Tizen
[profile/ivi/pixman.git] / Makefile.am
1 SUBDIRS = pixman demos test
2
3 pkgconfigdir=$(libdir)/pkgconfig
4 pkgconfig_DATA=pixman-1.pc
5
6 $(pkgconfig_DATA): pixman-1.pc.in
7
8 snapshot:
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
13 GPGKEY=6FF7C1A8
14 USERNAME=$$USER
15 RELEASE_OR_SNAPSHOT = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
16 RELEASE_CAIRO_HOST =    $(USERNAME)@cairographics.org
17 RELEASE_CAIRO_DIR =     /srv/cairo.freedesktop.org/www/$(RELEASE_OR_SNAPSHOT)s
18 RELEASE_CAIRO_URL =     http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
19 RELEASE_XORG_URL =      http://xorg.freedesktop.org/archive/individual/lib
20 RELEASE_XORG_HOST =     $(USERNAME)@xorg.freedesktop.org
21 RELEASE_XORG_DIR =      /srv/xorg.freedesktop.org/archive/individual/lib
22 RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org, xorg-announce@lists.freedesktop.org, pixman@lists.freedesktop.org
23
24 EXTRA_DIST =                            \
25         Makefile.win32                  \
26         Makefile.win32.common
27
28 tar_gz = $(PACKAGE)-$(VERSION).tar.gz
29 tar_bz2 = $(PACKAGE)-$(VERSION).tar.bz2
30
31 sha1_tgz = $(tar_gz).sha1
32 md5_tgz = $(tar_gz).md5
33
34 sha1_tbz2 = $(tar_bz2).sha1
35 md5_tbz2 = $(tar_bz2).md5
36
37 gpg_file = $(sha1_tgz).asc
38
39 $(sha1_tgz): $(tar_gz)
40         sha1sum $^ > $@
41
42 $(md5_tgz): $(tar_gz)
43         md5sum $^ > $@
44
45 $(sha1_tbz2): $(tar_bz2)
46         sha1sum $^ > $@
47
48 $(md5_tbz2): $(tar_bz2)
49         md5sum $^ > $@
50
51 $(gpg_file): $(sha1_tgz)
52         @echo "Please enter your GPG password to sign the checksum."
53         gpg --armor --sign $^ 
54
55 HASHFILES = $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(md5_tbz2)
56
57 release-verify-newer:
58         @echo -n "Checking that no $(VERSION) release already exists at $(RELEASE_XORG_HOST)..."
59         @ssh $(RELEASE_XORG_HOST) test ! -e $(RELEASE_XORG_DIR)/$(tar_gz) \
60                 || (echo "Ouch." && echo "Found: $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)/$(tar_gz)" \
61                 && echo "Refusing to try to generate a new release of the same name." \
62                 && false)
63         @ssh $(RELEASE_CAIRO_HOST) test ! -e $(RELEASE_CAIRO_DIR)/$(tar_gz) \
64                 || (echo "Ouch." && echo "Found: $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)/$(tar_gz)" \
65                 && echo "Refusing to try to generate a new release of the same name." \
66                 && false)
67         @echo "Good."
68
69 release-remove-old:
70         $(RM) $(tar_gz) $(tar_bz2) $(HASHFILES) $(gpg_file)
71
72 ensure-prev:
73         @if [[ "$(PREV)" == "" ]]; then                                                 \
74                 echo ""                                                           &&    \
75                 echo "You must set the PREV variable on the make command line to" &&    \
76                 echo "the last version."                                          &&    \
77                 echo ""                                                           &&    \
78                 echo "For example:"                                               &&    \
79                 echo "      make PREV=0.7.3"                                      &&    \
80                 echo ""                                                           &&    \
81                 false;                                                                  \
82         fi
83
84 release-check: ensure-prev release-verify-newer release-remove-old distcheck
85
86 release-tag:
87         git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
88
89 release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(gpg_file)
90         scp $(tar_gz) $(sha1_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
91         scp $(tar_gz) $(tar_bz2) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
92         ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
93
94 RELEASE_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)
95
96 release-publish-message: $(HASHFILES) ensure-prev
97         @echo "Please follow the instructions in RELEASING to push stuff out and"
98         @echo "send out the announcement mails.  Here is the excerpt you need:"
99         @echo ""
100         @echo "Lists:  $(RELEASE_ANNOUNCE_LIST)"
101         @echo "Subject: [ANNOUNCE] $(PACKAGE) release $(VERSION) now available"
102         @echo "============================== CUT HERE =============================="
103         @echo "A new $(PACKAGE) release $(VERSION) is now available. This is a $(RELEASE_TYPE)"
104         @echo ""
105         @echo "tar.gz:"
106         @echo " $(RELEASE_CAIRO_URL)/$(tar_gz)"
107         @echo " $(RELEASE_XORG_URL)/$(tar_gz)"
108         @echo ""
109         @echo "tar.bz2:"
110         @echo " $(RELEASE_XORG_URL)/$(tar_bz2)"
111         @echo ""
112         @echo "Hashes:"
113         @echo -n "      MD5:  "
114         @cat $(md5_tgz)
115         @echo -n "      MD5:  "
116         @cat $(md5_tbz2)
117         @echo -n "      SHA1: "
118         @cat $(sha1_tgz)
119         @echo -n "      SHA1: "
120         @cat $(sha1_tbz2)
121         @echo ""
122         @echo "GPG signature:"
123         @echo " $(RELEASE_CAIRO_URL)/$(gpg_file)"
124         @echo " (signed by `git config --get user.name` <`git config --get user.email`>)"
125         @echo ""
126         @echo "Git:"
127         @echo " git://git.freedesktop.org/git/pixman"
128         @echo " tag: $(PACKAGE)-$(VERSION)"
129         @echo ""
130         @echo "Log:"
131         @git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
132         @echo "============================== CUT HERE =============================="
133         @echo ""
134
135 release-publish: release-upload release-tag release-publish-message
136
137 .PHONY: release-upload release-publish release-publish-message release-tag