All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2, proof of concept] autoconf: Use %configure in git.spec, autoconf dependency only in rpm target
Date: Tue, 4 Jul 2006 16:09:35 +0200	[thread overview]
Message-ID: <200607041609.36329.jnareb@gmail.com> (raw)
In-Reply-To: <200607030156.50455.jnareb@gmail.com>

This is __Proof of Concept__ patch, which makes use of predefined 
%configure rpm macro to define install dirs, using autoconf 
generated ./configure script.

This patch introduces dependency on autoconf _only_ for rpm target during
build process. 
---
Probably there is more portable way of ignoring diff exit status than 
using '|| true', and probably better way to generate 
"file creation"/"new file" patch from a working directory (only) file
(perhaps using git-diff too).


Sidenote 1: current git.spec.in doesn't allow building RPMS from a dirty
version: 
  error: line 3: Illegal char '-' in version: Version:    1.4.1.g1c7c-dirty
Is it intentional?

Sidenote 2: building rpm currently does compilation _twice_, once to generate
git-tar-tree, and once in the rpm build (in BuildRoot).


 Makefile    |    3 +++
 git.spec.in |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3c2c257..8ad1a4a 100644
--- a/Makefile
+++ b/Makefile
@@ -721,6 +722,9 @@ dist: git.spec git-tar-tree
 	gzip -f -9 $(GIT_TARNAME).tar
 
 rpm: dist
+	autoconf
+	diff -Nu /dev/null configure > git-add-autoconf-configure.patch || true
+	gzip -f -9 git-add-autoconf-configure.patch
 	$(RPMBUILD) -ta $(GIT_TARNAME).tar.gz
 
 htmldocs = git-htmldocs-$(GIT_VERSION)
diff --git a/git.spec.in b/git.spec.in
index 8ccd256..9c02803 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -7,6 +7,7 @@ License: 	GPL
 Group: 		Development/Tools
 URL: 		http://kernel.org/pub/software/scm/git/
 Source: 	http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
+Patch0: 	git-add-autoconf-configure.patch.gz
 BuildRequires:	zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel  %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:	git-core, git-svn, git-cvs, git-arch, git-email, gitk
@@ -72,15 +73,16 @@ Git revision tree visualiser ('gitk')
 
 %prep
 %setup -q
+%patch0 -p0
 
 %build
+%configure
 make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
-     prefix=%{_prefix} all %{!?_without_docs: doc}
+     all %{!?_without_docs: doc}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 make %{_smp_mflags} DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease \
-     prefix=%{_prefix} mandir=%{_mandir} \
      install %{!?_without_docs: install-doc}
 
 (find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "arch|svn|cvs|email|gitk" | sed -e s@^$RPM_BUILD_ROOT@@)               > bin-man-doc-files
-- 
1.4.0

  parent reply	other threads:[~2006-07-04 14:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-02 23:56 [PATCH 1] autoconf: Use autoconf to write installation directories to config.mak.autogen Jakub Narebski
2006-07-03  0:02 ` [PATCH 2] autoconf: Use ./configure script in git *.spec file Jakub Narebski
2006-07-03  0:13   ` Junio C Hamano
2006-07-03  0:29     ` Jakub Narebski
2006-07-03  2:09       ` Junio C Hamano
2006-07-03  2:13         ` contrib/ status Junio C Hamano
2006-07-03  8:06           ` Eric Wong
2006-07-03 21:04             ` Junio C Hamano
2006-07-04 21:56               ` Eric Wong
2006-07-06  7:14                 ` [RFC/PATCH] git-svn: migrate out of contrib Eric Wong
2006-07-07  0:20                   ` Junio C Hamano
2006-07-07 10:03                     ` [PATCH] " Eric Wong
2006-07-04 11:26           ` contrib/ status Jakub Narebski
2006-07-04 11:43             ` Johannes Schindelin
2006-07-03 11:05         ` [PATCH 2] autoconf: Use ./configure script in git *.spec file Jakub Narebski
2006-07-03 20:08           ` Junio C Hamano
2006-07-03 20:43             ` Jakub Narebski
2006-07-03  0:13 ` [PATCH 1] autoconf: Use autoconf to write installation directories to config.mak.autogen Junio C Hamano
2006-07-04 14:09 ` Jakub Narebski [this message]
2006-07-06  4:16   ` [PATCH 2, proof of concept] autoconf: Use %configure in git.spec, autoconf dependency only in rpm target Pavel Roskin
2006-07-07 20:06     ` Jakub Narebski
2006-07-08 21:07 ` [PATCH 2] Teach make clean about configure and autoconf Jakub Narebski
2006-07-08 21:07   ` [RFC/PATCH 3] Copy description of build configuration variables to configure.ac Jakub Narebski
2006-07-08 21:07     ` [RFC/PATCH 4] autoconf: Preparing the way for autodetection Jakub Narebski
2006-07-08 21:07       ` [PATCH 5] autoconf: Checks for typedefs, structures, and compiler characteristics Jakub Narebski
2006-07-08 21:07         ` [RFC/PATCH 6] autoconf: Checks for some library functions Jakub Narebski
2006-07-08 21:07           ` [RFC/PATCH 7] autoconf: Checks for libraries Jakub Narebski
2006-07-08 21:07             ` [RFC/PATCH 8] autoconf: Checks for some programs Jakub Narebski
2006-07-08 21:07               ` [PATCH 9] configure.ac vertical whitespace usage cleanup Jakub Narebski
2006-07-08 21:07                 ` Comment on this series of patches (PATCH 2-9) Jakub Narebski
2006-07-08 21:20                   ` Junio C Hamano
2006-07-09  8:21     ` [RFC/PATCH 3] Copy description of build configuration variables to configure.ac Junio C Hamano
2006-07-09 16:47       ` Jakub Narebski
2006-07-09 20:43         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607041609.36329.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.