1# vim:set noet ts=4: 2# 3# ibus-libpinyin - Intelligent Pinyin engine based on libpinyin for IBus 4# 5# Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> 6# 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2, or (at your option) 10# any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 21if IBUS_BUILD_LUA_EXTENSION 22LUADIR=lua 23endif 24 25SUBDIRS = \ 26 data \ 27 $(LUADIR) \ 28 src \ 29 setup \ 30 m4 \ 31 po \ 32 $(NULL) 33 34DISTCHECK_CONFIGURE_FLAGS = \ 35 CFLAGS='-g3 -O3 -Wall' \ 36 CXXFLAGS='-g3 -O3 -Wall' \ 37 $(NULL) 38 39ACLOCAL_AMFLAGS = -I m4 40 41EXTRA_DIST = config.rpath \ 42 autogen.sh \ 43 ibus-libpinyin.spec.in \ 44 $(NULL) 45 46noinst_DIST = \ 47 $(NULL) 48 49 50DISTCLEANFILES = \ 51 po/stamp-it \ 52 $(NULL) 53 54dist-hook: 55 if test -d .git ; then \ 56 git log --name-status --date=iso > $(distdir)/ChangeLog ; \ 57 fi 58 59rpm: dist @PACKAGE_NAME@.spec 60 rpmbuild -bb \ 61 --define "_sourcedir `pwd`" \ 62 --define "_builddir `pwd`/rpm" \ 63 --define "_srcrpmdir `pwd`/rpm" \ 64 --define "_rpmdir `pwd`/rpm" \ 65 --define "_specdir `pwd`" \ 66 @PACKAGE_NAME@.spec 67 68srpm: dist @PACKAGE_NAME@.spec 69 rpmbuild -bs \ 70 --define "_sourcedir `pwd`" \ 71 --define "_builddir `pwd`/rpm" \ 72 --define "_srcrpmdir `pwd`/rpm" \ 73 --define "_rpmdir `pwd`/rpm" \ 74 --define "_specdir `pwd`" \ 75 @PACKAGE_NAME@.spec 76 77.PHONY: debian/changelog 78debian/changelog: 79 $(AM_V_GEN) \ 80 ( \ 81 . /etc/lsb-release; \ 82 date=`date -R`; \ 83 version=@VERSION@; \ 84 serie=$(serie); \ 85 if test -z "$$serie"; then \ 86 serie=$$DISTRIB_CODENAME; \ 87 fi; \ 88 if test -z "$$release"; then \ 89 release=1; \ 90 fi; \ 91 s=`cat debian/changelog.in`; \ 92 eval "echo \"$${s}\""; \ 93 ) > $@ 94 95ppa: dist debian/changelog 96 $(AM_V_GEN) \ 97 ( \ 98 mkdir ppa; \ 99 cp $(distdir).tar.gz ppa/@PACKAGE_NAME@_@PACKAGE_VERSION@.orig.tar.gz ; \ 100 cd ppa; \ 101 tar zxvf ../$(distdir).tar.gz ; \ 102 cd $(distdir); \ 103 cp -a ../../debian . ; \ 104 cd debian; \ 105 debuild -S -sa ; \ 106 ) 107 108dpkg: dist debian/changelog 109 $(AM_V_GEN) \ 110 ( \ 111 mkdir ppa; \ 112 cd ppa; \ 113 tar zxvf ../$(distdir).tar.gz ; \ 114 cd $(distdir); \ 115 cp -a ../../debian . ; \ 116 cd debian; \ 117 debuild -b -uc -us; \ 118 ) 119 120clean-rpm: 121 $(RM) -r "`uname -i`" 122 123clean-local: clean-rpm 124