diff --git a/.gitignore b/.gitignore index f639c88..0011a57 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /libinput-0.4.0.tar.xz /libinput-0.5.0.tar.xz /libinput-0.6.0.tar.xz +/libinput-20141124.tar.xz diff --git a/commitid b/commitid new file mode 100644 index 0000000..81af69a --- /dev/null +++ b/commitid @@ -0,0 +1 @@ +92d178f167302665d51b3dba79d18de4c1881bdb diff --git a/libinput.spec b/libinput.spec index b7e258d..a264db6 100644 --- a/libinput.spec +++ b/libinput.spec @@ -1,12 +1,23 @@ +%global gitdate 20141124 +%global gitversion 92d178f16 + Name: libinput Version: 0.6.0 -Release: 2%{?dist} +Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Summary: Input device library License: MIT URL: http://www.freedesktop.org/wiki/Software/libinput/ +%if 0%{?gitdate} +Source0: %{name}-%{gitdate}.tar.xz +Source1: make-git-snapshot.sh +Source2: commitid +%else Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz +%endif +BuildRequires: git +BuildRequires: autoconf automake libtool pkgconfig BuildRequires: libevdev-devel BuildRequires: libudev-devel BuildRequires: mtdev-devel @@ -30,10 +41,21 @@ developing applications that use %{name}. %prep -%setup -q +%setup -q -n %{name}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +git init +if [ -z "$GIT_COMMITTER_NAME" ]; then + git config user.email "x@fedoraproject.org" + git config user.name "Fedora X Ninjas" +fi +git add . +git commit --allow-empty -a -q -m "%{version} baseline." + +# Apply all the patches. +git am -p1 %{patches} < /dev/null %build -%configure --disable-static +autoreconf -v --install --force || exit 1 +%configure --disable-static --disable-silent-rules make %{?_smp_mflags} @@ -58,6 +80,11 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %changelog +* Mon Nov 24 2014 Peter Hutterer 0.6.0-3.20141124git92d178f16 +- Add the hooks to build from a git snapshot +- Disable silent rules +- Update to today's git master + * Fri Sep 12 2014 Peter Hutterer 0.6.0-2 - libinput 0.6.0 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..a61db49 --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DIRNAME=libinput-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/wayland/libinput $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.xz $DIRNAME +rm -rf $DIRNAME diff --git a/sources b/sources index d663f46..b85d292 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 3afaf9f66d8796323a79edb879c10ba3 libinput-0.6.0.tar.xz +f63a656eb93117da43302566df0de874 libinput-20141124.tar.xz