]> git.pld-linux.org Git - packages/ejabberd.git/commitdiff
Make a dummy git repository for building
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 15 Nov 2013 15:17:22 +0000 (16:17 +0100)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 15 Nov 2013 15:17:22 +0000 (16:17 +0100)
I give up. It wants a GIT repository, let it have it.

ejabberd.spec

index baceae7b9195cc01d213df6b4666a6a622e4b49f..b1903ca252a0b81d8bf2f360ac27af2464f25b63 100644 (file)
@@ -70,6 +70,7 @@ BuildRequires:        pam-devel
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: yaml-devel
 BuildRequires: zlib-devel
+BuildRequires: git-core
 Requires(post):        /usr/bin/perl
 Requires(post):        jabber-common
 Requires(post):        sed >= 4.0
@@ -106,13 +107,19 @@ Server-side logging module.
 %patch2 -p0
 %endif
 
-# do not let it use 'git describe' to fetch version
-# it uses nonsense during manual builds and fails on the builder
-sed -i -e"s/AC_INIT(ejabberd,[^,]*,/AC_INIT(ejabberd,community %{version},/" configure.ac
-sed -i -e's/\([[:space:]]*REVISION=\).*git.*describe.*/\1"%{version}"/' contrib/extract_translations/prepare-translation.sh
-! grep -q "git describe" configure.ac contrib/extract_translations/prepare-translation.sh
+# Various parts of the build system use 'git describe'
+# which returns nonsense on manual builds using the builder script
+# and which fails on the PLD builders
+# I was not able to locate all 'git describe' invocation, sot let's
+# fool them with this dummy repository
+unset GIT_DIR GIT_WORK_TREE
+git init
+git add configure.ac
+git commit -a -m "dummy commit"
+git tag "%{version}"
 
 %build
+unset GIT_DIR GIT_WORK_TREE
 %{__aclocal} -I m4
 %{__autoconf}
 %configure \
@@ -159,6 +166,8 @@ cd ../..
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/var/lib/%{realname},/etc/{sysconfig,rc.d/init.d},%{_sbindir}}
 
+unset GIT_DIR GIT_WORK_TREE
+
 %{__make} install -j1 \
        CHOWN_COMMAND=true \
        O_USER="" \
This page took 0.027072 seconds and 4 git commands to generate.