add bits required to build from git

update to today's git snapshot
This commit is contained in:
Peter Hutterer 2011-03-11 10:24:36 +10:00
parent a7b998d8fe
commit fa0bc28812
5 changed files with 52 additions and 8 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ xkeyboard-config-1.8.tar.bz2
xkeyboard-config-1.9.tar.bz2 xkeyboard-config-1.9.tar.bz2
/xkeyboard-config-2.0.tar.bz2 /xkeyboard-config-2.0.tar.bz2
/xkeyboard-config-2.1.tar.bz2 /xkeyboard-config-2.1.tar.bz2
/xkeyboard-config-20110311.tar.bz2

1
commitid Normal file
View File

@ -0,0 +1 @@
9333b2f3f0e3f1724b7a5c04b8ffc5eafb96fefa

18
make-git-snapshot.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
MODULE=xkeyboard-config
DIRNAME=$MODULE-$( date +%Y%m%d )
rm -rf $DIRNAME
git clone git://git.freedesktop.org/git/$MODULE $DIRNAME
cd $DIRNAME
if [ -z "$1" ]; then
git log | head -1
else
git checkout $1
fi
git log | head -1 | awk '{ print $2 }' > ../commitid
git repack -a -d
cd ..
tar jcf $DIRNAME.tar.bz2 $DIRNAME
rm -rf $DIRNAME

View File

@ -1 +1 @@
57ecc78bacd8ecc398d8ed6588f4d04b xkeyboard-config-2.1.tar.bz2 04d61814e9499b899bce939fe67888d8 xkeyboard-config-20110311.tar.bz2

View File

@ -1,14 +1,23 @@
# INFO: Package contains data-only, no binaries, so no debuginfo is needed # INFO: Package contains data-only, no binaries, so no debuginfo is needed
%define debug_package %{nil} %define debug_package %{nil}
%global gitdate 20110311
%global gitversion 9333b2f3
Summary: X Keyboard Extension configuration data Summary: X Keyboard Extension configuration data
Name: xkeyboard-config Name: xkeyboard-config
Version: 2.1 Version: 2.1.99
Release: 2%{?dist} Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
License: MIT License: MIT
Group: User Interface/X Group: User Interface/X
URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
%if 0%{?gitdate}
Source0: %{name}-%{gitdate}.tar.bz2
Source1: make-git-snapshot.sh
Source2: commitid
%else
Source0: ftp://ftp.x.org/pub/individual/data/%{name}/%{name}-%{version}.tar.bz2 Source0: ftp://ftp.x.org/pub/individual/data/%{name}/%{name}-%{version}.tar.bz2
%endif
BuildArch: noarch BuildArch: noarch
@ -19,6 +28,8 @@ BuildRequires: perl(XML::Parser)
BuildRequires: intltool BuildRequires: intltool
BuildRequires: gettext BuildRequires: gettext
BuildRequires: git-core BuildRequires: git-core
BuildRequires: automake autoconf libtool pkgconfig
BuildRequires: glib2-devel
%description %description
This package contains configuration data used by the X Keyboard Extension This package contains configuration data used by the X Keyboard Extension
@ -35,19 +46,28 @@ Requires: pkgconfig
%{name} development package %{name} development package
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
git init-db %if 0%{?gitdate}
git checkout -b fedora
sed -i 's/git/&+ssh/' .git/config
if [ -z "$GIT_COMMITTER_NAME" ]; then if [ -z "$GIT_COMMITTER_NAME" ]; then
git config user.email "x@fedoraproject.org" git config user.email "x@fedoraproject.org"
git config user.name "Fedora X Ninjas" git config user.name "Fedora X Ninjas"
fi fi
git add . %else
git commit -a -q -m "%{version} baseline." git init
if [ -z "$GIT_COMMITTER_NAME" ]; then
git config user.email "x@fedoraproject.org"
git config user.name "Fedora X Ninjas"
fi
%endif
#git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec) #git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec)
%build %build
intltoolize
autoreconf -v --install || exit 1
%configure \ %configure \
--enable-compat-rules \ --enable-compat-rules \
--with-xkb-base=%{_datadir}/X11/xkb \ --with-xkb-base=%{_datadir}/X11/xkb \
@ -84,6 +104,10 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
%{_datadir}/pkgconfig/xkeyboard-config.pc %{_datadir}/pkgconfig/xkeyboard-config.pc
%changelog %changelog
* Fri Mar 11 2011 Peter Hutterer <peter.hutterer@redhat.com> 2.1.99-1.20110311-git9333b2f3
- add bits required to build from git
- update to today's git snapshot
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild