upload tizen1.0 source
[framework/uifw/xorg/util/xkeyboard-config.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 include debian/xsfbs/xsfbs.mk
7
8 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10
11 # FOR AUTOCONF 2.52 AND NEWER ONLY
12 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
13         confflags += --build $(DEB_HOST_GNU_TYPE)
14 else
15         confflags += --build $(DEB_HOST_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
16 #       confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
17 endif
18
19 DATAFS = opt
20 xkb_base := /$(DATAFS)/etc/X11/xkb
21 #xkb_base := /usr/share/X11/xkb
22
23 configure:
24 #configure: $(STAMP_DIR)/patch
25         intltoolize -c -f
26         autoreconf -vfi
27
28 config.status: configure
29         dh_testdir
30         ./configure $(confflags) \
31           --prefix=/$(DATAFS) \
32           --disable-xkbcomp-symlink --with-xkb-rules-symlink=xfree86,xorg \
33           --with-xkb-base=$(xkb_base) --datarootdir=/opt/etc
34         >$@
35
36 #build: $(STAMP_DIR)/build
37 #$(STAMP_DIR)/build: config.status
38 build: build-stamp
39 build-stamp: config.status
40         dh_testdir
41         $(MAKE)
42         cd po && intltool-update -p && cd ..
43         >$@
44
45 clean: xsfclean
46         dh_testdir
47         dh_testroot
48         [ ! -f Makefile ] || $(MAKE) distclean
49         rm -rf $$(find -name Makefile.in)
50         rm -f aclocal.m4 configure install-sh intltool-*.in
51         rm -f missing po/Makefile.in.in
52         rm -f semantics/semantics.dir
53         rm -f rules/evdev rules/evdev.xml.in
54
55         # Files not cleaned up
56         -rm -f intltool-extract intltool-merge intltool-update
57         -rm -f rules/base.xml
58         -rm -f po/.intltool-merge-cache config.status.lineno
59         dh_clean 
60         rm -f compat/compat.dir geometry/geometry.dir keycodes/keycodes.dir
61         rm -f keymap/keymap.dir symbols/symbols.dir types/types.dir rules/base
62         rm -f rules/compat/base.l[2-4]*.part rules/compat/base.m*.part
63
64 deb:
65         dpkg-buildpackage -rfakeroot -i'/\.git|/\.svn'
66
67 dir:
68         set -e; for f in compat geometry keycodes keymap semantics symbols types; do \
69           rm -f $$f/$$f.dir; \
70           cd $$f; \
71           make $$f.dir XKBCOMP=xkbcomp; \
72           LC_ALL=C sort -k3 $$f.dir > $$f.new && mv $$f.new $$f.dir; \
73           cd ..; \
74           cp $$f/$$f.dir debian/; \
75         done
76
77 install: build
78         dh_testdir
79         dh_testroot
80         dh_clean -k 
81         dh_installdirs
82
83         $(MAKE) install DESTDIR=$(CURDIR)/debian/xkb-data
84         #  Remove this symlink, it is no more needed
85         rm -f $(CURDIR)/debian/xkb-data/$(xkb_base)/compiled
86
87         # Move base.xml to /etc/X11/xkb/ and make
88         # /usr/share/X11/xkb/rules/base.xml links to it
89         mv debian/xkb-data/$(DATAFS)/etc/X11/xkb/rules/base.xml debian/xkb-data/etc/X11/xkb/
90         dh_link etc/X11/xkb/base.xml $(DATAFS)/etc/X11/xkb/rules/base.xml
91
92 # Build architecture-dependent files here.
93 binary-arch: build install
94 # We have nothing to do by default.
95
96 # Build architecture-independent files here.
97 binary-indep: build install
98         dh_testdir
99         dh_testroot
100 #       dh_installchangelogs ChangeLog
101 #       dh_installdocs
102         dh_compress
103         dh_fixperms
104         dh_installdeb
105         dh_gencontrol
106         dh_md5sums
107         dh_builddeb
108
109 binary: binary-indep binary-arch
110 .PHONY: build clean binary-indep binary-arch binary install