[xkeyboard-config] add bits required to build from git update to today's git snapshot

Peter Hutterer whot at fedoraproject.org
Fri Mar 11 00:33:47 UTC 2011


commit fa0bc28812d9c029a0c2d31655c62f38b4af282d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Mar 11 10:24:36 2011 +1000

    add bits required to build from git
    update to today's git snapshot

 .gitignore            |    1 +
 commitid              |    1 +
 make-git-snapshot.sh  |   18 ++++++++++++++++++
 sources               |    2 +-
 xkeyboard-config.spec |   38 +++++++++++++++++++++++++++++++-------
 5 files changed, 52 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e76b75c..f0f8fa9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ xkeyboard-config-1.8.tar.bz2
 xkeyboard-config-1.9.tar.bz2
 /xkeyboard-config-2.0.tar.bz2
 /xkeyboard-config-2.1.tar.bz2
+/xkeyboard-config-20110311.tar.bz2
diff --git a/commitid b/commitid
new file mode 100644
index 0000000..d4d4b9b
--- /dev/null
+++ b/commitid
@@ -0,0 +1 @@
+9333b2f3f0e3f1724b7a5c04b8ffc5eafb96fefa
diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh
new file mode 100755
index 0000000..86476ee
--- /dev/null
+++ b/make-git-snapshot.sh
@@ -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
diff --git a/sources b/sources
index 985c01d..5b89e66 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-57ecc78bacd8ecc398d8ed6588f4d04b  xkeyboard-config-2.1.tar.bz2
+04d61814e9499b899bce939fe67888d8  xkeyboard-config-20110311.tar.bz2
diff --git a/xkeyboard-config.spec b/xkeyboard-config.spec
index 8b662a0..791d9eb 100644
--- a/xkeyboard-config.spec
+++ b/xkeyboard-config.spec
@@ -1,14 +1,23 @@
 # INFO: Package contains data-only, no binaries, so no debuginfo is needed
 %define debug_package %{nil}
 
+%global gitdate 20110311
+%global gitversion 9333b2f3
+
 Summary: X Keyboard Extension configuration data
 Name: xkeyboard-config
-Version: 2.1
-Release: 2%{?dist}
+Version: 2.1.99
+Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
 License: MIT
 Group: User Interface/X
 URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
-Source0: ftp://ftp.x.org/pub/individual/data/%{name}/%{name}-%{version}.tar.bz2
+%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
+%endif
 
 BuildArch: noarch
 
@@ -19,6 +28,8 @@ BuildRequires: perl(XML::Parser)
 BuildRequires: intltool
 BuildRequires: gettext
 BuildRequires: git-core
+BuildRequires: automake autoconf libtool pkgconfig
+BuildRequires: glib2-devel
 
 %description
 This package contains configuration data used by the X Keyboard Extension 
@@ -35,19 +46,28 @@ Requires: pkgconfig
 %{name} development package
 
 %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
+    git config user.email "x at fedoraproject.org"
+    git config user.name "Fedora X Ninjas"
+fi
+%else
+git init
 if [ -z "$GIT_COMMITTER_NAME" ]; then
     git config user.email "x at fedoraproject.org"
     git config user.name "Fedora X Ninjas"
 fi
-git add .
-git commit -a -q -m "%{version} baseline."
+%endif
 
 #git am -p1 $(awk '/^Patch.*:/ { print "%{_sourcedir}/"$2 }' %{_specdir}/%{name}.spec)
 
 %build
+intltoolize
+autoreconf -v --install || exit 1
 %configure \
     --enable-compat-rules \
     --with-xkb-base=%{_datadir}/X11/xkb \
@@ -84,6 +104,10 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
 %{_datadir}/pkgconfig/xkeyboard-config.pc
 
 %changelog
+* Fri Mar 11 2011 Peter Hutterer <peter.hutterer at 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 at lists.fedoraproject.org> - 2.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list