NEWS/Changelog for previous commit.
[fvwm.git] / rpm / Makefile.am
blobc1231834b8848ee5094698ae451c319b16af9442
1 ## This is a -*- Makefile -*-
2 ## Process this file with automake to create Makefile.in
4 EXTRA_DIST = @PACKAGE@.spec
6 version = @VERSION@
7 release = 0.`date +%Y%m%d`
8 cparams = --without-gnome --without-rplay-library --sysconfdir=/etc --enable-htmldoc
9 mparams = CFLAGS="-O2"
11 this: @PACKAGE@.spec
12         @\
13         version=$(version); \
14         release=$(release); \
15         cparams='$(cparams)'; \
16         mparams='$(mparams)'; \
17         tarball=@PACKAGE@-$$version.tar.gz; \
18         tarball_full=`cd $(top_srcdir) && pwd`/$$tarball; \
19         if [ ! -f $$tarball_full ]; then echo "No $$tarball"; exit -1; fi; \
20         ln -sf $$tarball_full /tmp/$$tarball || exit -1; \
21         echo ""; \
22         echo "==== Creating rpm from /tmp/$$tarball, release $$release ===="; \
23         echo ""; \
24         sleep 3; \
25         sed < @PACKAGE@.spec > tmp-@PACKAGE@.spec \
26                 -e "s|%define ver |&$$version  %define old_ver |" \
27                 -e "s|%define rel |&$$release  %define old_rel |" \
28                 -e "s|%define c_p |&$$cparams  %define old_c_p |" \
29                 -e "s|%define m_p |&$$mparams  %define old_m_p |" \
30         ; \
31         rpmbuild -ba tmp-@PACKAGE@.spec --clean; \
32         rm /tmp/$$tarball; \
33         rm tmp-@PACKAGE@.spec