upload tizen2.0 source
[framework/uifw/xorg/util/xkeyboard-config.git] / packaging / xkeyboard-config.spec
1 # INFO: Package contains data-only, no binaries, so no debuginfo is needed
2 %define debug_package %{nil}
3
4
5 Summary: X Keyboard Extension configuration data
6 Name: xkeyboard-config
7 Version: 2.6
8 Release: 3.2
9 License: MIT
10 Group: User Interface/X
11 URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
12
13 Source: %{name}-%{version}.tar.gz
14
15 #%if 0%{?gitdate}
16 #Source0:    %{name}-%{gitdate}.tar.bz2
17 #Source1:    make-git-snapshot.sh
18 #Source2:    commitid
19 #%else
20 #Source0: http://xorg.freedesktop.org/archive/individual/data/xkeyboard-config/%{name}-%{version}.tar.bz2
21 #%endif
22
23 # Bug 826220 - Tilda is now a dead key (for accented chars)
24 #Patch01: 0001-Reverting-broken-fix-for-is-keyboard.patch
25
26 BuildArch: noarch
27
28 BuildRequires: pkgconfig
29 BuildRequires: xorg-x11-xutils-dev
30 BuildRequires: xkbcomp
31 BuildRequires: perl(XML::Parser)
32 BuildRequires: intltool
33 BuildRequires: gettext
34 #BuildRequires: git-core
35 BuildRequires: automake autoconf libtool pkgconfig
36 BuildRequires: glib2-devel
37 BuildRequires: pkgconfig(xproto)
38 BuildRequires: libX11-devel
39 BuildRequires: libxslt
40 Provides:    xkbdata
41
42 %package -n xkb-data
43 Summary:    X Keyboard Extension (XKB) configuration data
44 Group:      System/X11
45
46 %description -n xkb-data
47 %{summary}
48
49 %package -n xkb-data-i18n
50 Summary:    X Keyboard Extension (XKB) configuration data
51 Group:      System/X11
52
53 %description -n xkb-data-i18n
54 %{summary}
55
56 %description
57 This package contains configuration data used by the X Keyboard Extension 
58 (XKB), which allows selection of keyboard layouts when using a graphical 
59 interface. 
60
61 %package devel
62 Summary: Development files for %{name}
63 Group: User Interface/X
64 Requires: %{name} = %{version}-%{release}
65 Requires: pkgconfig
66
67 %description devel
68 %{name} development package
69
70 %prep
71 %setup -q
72 #%setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
73
74 #%if 0%{?gitdate}
75 #git checkout -b fedora
76 #sed -i 's/git/&+ssh/' .git/config
77 #if [ -z "$GIT_COMMITTER_NAME" ]; then
78 #    git config user.email "x@fedoraproject.org"
79 #    git config user.name "Fedora X Ninjas"
80 #fi
81 #git commit -am "%{name} %{version}"
82 #%else
83 #git init
84 #if [ -z "$GIT_COMMITTER_NAME" ]; then
85 #    git config user.email "x@fedoraproject.org"
86 #    git config user.name "Fedora X Ninjas"
87 #fi
88 #git add .
89 #git commit -a -q -m "%{name} %{version} baseline."
90 #%endif
91
92 #git am -p1 %{patches} < /dev/null
93
94 %build
95 #autoreconf -i -v -f
96 #AUTOPOINT="intltoolize --automake --copy" autoreconf -v --force --install || exit 1
97 #intltoolize -c -f   
98 #autoreconf -vfi
99 %configure \
100     --enable-compat-rules \
101     --with-xkb-base=/usr/etc/X11/xkb --datarootdir=/usr/etc \
102     --disable-xkbcomp-symlink \
103     --with-xkb-rules-symlink=xfree86,xorg
104
105 make %{?jobs:-j%jobs} %{?_smp_mflags}
106
107 %install
108 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
109
110 %remove_docs
111
112 # Remove unnecessary symlink
113 rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
114 %find_lang %{name} 
115
116 mkdir -p  %{buildroot}/etc/X11/xkb/
117 mv %{buildroot}/usr/etc/X11/xkb/rules/base.xml %{buildroot}/etc/X11/xkb/
118 pushd %{buildroot}
119 ln -s etc/X11/xkb/base.xml usr/etc/X11/xkb/rules/base.xml
120 popd
121
122 # Create filelist
123 {
124    FILESLIST=${PWD}/files.list
125    pushd $RPM_BUILD_ROOT
126    find .%{_datadir}/X11/xkb -type d | sed -e "s/^\./%dir /g" > $FILESLIST
127    find .%{_datadir}/X11/xkb -type f | sed -e "s/^\.//g" >> $FILESLIST
128    popd
129 }
130
131 %files -f files.list -f %{name}.lang
132 %defattr(-,root,root,-)
133 #%doc AUTHORS README NEWS TODO COPYING CREDITS docs/README.* docs/HOWTO.*
134 /etc/X11/xkb/base.xml
135 /usr/etc/X11/xkb/rules/base.xml
136 /usr/etc/X11/xkb/rules/xfree86
137 /usr/etc/X11/xkb/rules/xfree86.lst
138 /usr/etc/X11/xkb/rules/xfree86.xml
139 /usr/etc/X11/xkb/rules/xorg
140 /usr/etc/X11/xkb/rules/xorg.lst
141 /usr/etc/X11/xkb/rules/xorg.xml
142 #%{_mandir}/man7/xkeyboard-config.*
143
144 %files devel
145 %defattr(-,root,root,-)
146 %{_datadir}/pkgconfig/xkeyboard-config.pc
147
148 %files -n xkb-data
149 #%defattr(-,root,root,-)
150 /usr/etc/X11/*
151
152 %files -n xkb-data-i18n
153 #%defattr(-,root,root,-)
154 /usr/share/locale/*