* [PATCH] add git.spec and adapt Makefile for RPM build
@ 2005-05-02 10:23 Kay Sievers
2005-05-02 14:52 ` Kay Sievers
0 siblings, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2005-05-02 10:23 UTC (permalink / raw)
To: git; +Cc: Linus Torvalds
Add support for building the rpm package directly from the git tree.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,10 @@
# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
# break unless your underlying filesystem supports those sub-second times
# (my ext3 doesn't).
+
+prefix=$(HOME)
+bindir=$(prefix)/bin
+
CFLAGS=-g -O2 -Wall
CC=gcc
@@ -26,7 +30,11 @@ PROG= git-update-cache git-diff-files
all: $(PROG)
install: $(PROG) $(SCRIPTS)
- install $(PROG) $(SCRIPTS) $(HOME)/bin/
+ install -m755 -d $(DESTDIR)$(bindir)
+ install $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
+
+uninstall:
+ cd $(DESTDIR)$(bindir) && rm $(PROG) $(SCRIPTS)
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o
Created: git.spec (mode:100644)
--- /dev/null
+++ b/git.spec
@@ -0,0 +1,44 @@
+Name: git
+Version: 0.7
+Release: 1
+Vendor: Linus Torvalds <torvalds@osdl.org>
+Summary: git
+License: GPL
+Group: Development/Tools
+URL: http://www.kernel.org/pub/software/scm/git/
+Source: http://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2
+Provides: git = %{version}
+BuildRequires: zlib-devel openssl-devel curl-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Prereq: sh-utils diffutils
+
+%description
+git is an fast and flexible filesystem-based database designed to store directory
+trees with regard to their history. It is the base for SCM tools bild on top of
+git like cogito.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT prefix=/usr install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/bin/*
+#%{_mandir}/*/*
+
+%changelog
+* Thu May 2 2005 Kay Sievers <kay.sievers@vrfy.org> 0.7-1
+- rpm build for core git
+
+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1
+- Initial rpm build
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 10:23 [PATCH] add git.spec and adapt Makefile for RPM build Kay Sievers
@ 2005-05-02 14:52 ` Kay Sievers
2005-05-02 17:41 ` Horst von Brand
0 siblings, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2005-05-02 14:52 UTC (permalink / raw)
To: git; +Cc: Linus Torvalds
On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:
> Add support for building the rpm package directly from the git tree.
This version creates the git.spec from a git.spec.in with the version
number from the Makefile.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,12 @@
# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
# break unless your underlying filesystem supports those sub-second times
# (my ext3 doesn't).
+
+VERSION = 0.7
+
+prefix=$(HOME)
+bindir=$(prefix)/bin
+
CFLAGS=-g -O2 -Wall
CC=gcc
@@ -25,8 +31,15 @@ PROG= git-update-cache git-diff-files
all: $(PROG)
+git.spec: git.spec.in Makefile
+ sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
+
install: $(PROG) $(SCRIPTS)
- install $(PROG) $(SCRIPTS) $(HOME)/bin/
+ install -m755 -d $(DESTDIR)$(bindir)
+ install $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
+
+uninstall:
+ cd $(DESTDIR)$(bindir) && rm $(PROG) $(SCRIPTS)
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o
@@ -110,7 +123,7 @@ diff.o: $(LIB_H)
strbuf.o: $(LIB_H)
clean:
- rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)
+ rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE) git.spec
backup: clean
cd .. ; tar czvf dircache.tar.gz dir-cache
Created: git.spec.in (mode:100644)
--- /dev/null
+++ b/git.spec.in
@@ -0,0 +1,44 @@
+Name: git
+Version: @@VERSION@@
+Release: 1
+Vendor: Linus Torvalds <torvalds@osdl.org>
+Summary: git
+License: GPL
+Group: Development/Tools
+URL: http://www.kernel.org/pub/software/scm/git/
+Source: http://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2
+Provides: git = %{version}
+BuildRequires: zlib-devel openssl-devel curl-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Prereq: sh-utils diffutils
+
+%description
+git is an fast and flexible filesystem-based database designed to store directory
+trees with regard to their history. It is the base for SCM tools bild on top of
+git like cogito.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT prefix=/usr install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/bin/*
+#%{_mandir}/*/*
+
+%changelog
+* Thu May 2 2005 Kay Sievers <kay.sievers@vrfy.org> 0.7-1
+- rpm build for core git
+
+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1
+- Initial rpm build
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 14:52 ` Kay Sievers
@ 2005-05-02 17:41 ` Horst von Brand
2005-05-02 18:39 ` Chris Wright
0 siblings, 1 reply; 8+ messages in thread
From: Horst von Brand @ 2005-05-02 17:41 UTC (permalink / raw)
To: Kay Sievers; +Cc: git, Linus Torvalds
Kay Sievers <kay.sievers@vrfy.org> said:
> On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:
> > Add support for building the rpm package directly from the git tree.
>
> This version creates the git.spec from a git.spec.in with the version
> number from the Makefile.
Please don't. The spec file /controls/ the building of the package, it can't
be generated as part of the build process.
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 17:41 ` Horst von Brand
@ 2005-05-02 18:39 ` Chris Wright
2005-05-02 18:58 ` Horst von Brand
0 siblings, 1 reply; 8+ messages in thread
From: Chris Wright @ 2005-05-02 18:39 UTC (permalink / raw)
To: Horst von Brand; +Cc: Kay Sievers, git, Linus Torvalds
* Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> Kay Sievers <kay.sievers@vrfy.org> said:
> > On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:
> > > Add support for building the rpm package directly from the git tree.
> >
> > This version creates the git.spec from a git.spec.in with the version
> > number from the Makefile.
>
> Please don't. The spec file /controls/ the building of the package, it can't
> be generated as part of the build process.
It certainly can. It simply means a structured release process. IOW,
the git.spec would be generated for a release tarball.
thanks,
-chris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 18:39 ` Chris Wright
@ 2005-05-02 18:58 ` Horst von Brand
2005-05-02 19:06 ` Paul Jakma
2005-05-02 19:08 ` Chris Wright
0 siblings, 2 replies; 8+ messages in thread
From: Horst von Brand @ 2005-05-02 18:58 UTC (permalink / raw)
To: Chris Wright; +Cc: Kay Sievers, git, Linus Torvalds
Chris Wright <chrisw@osdl.org> said:
> * Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> > Kay Sievers <kay.sievers@vrfy.org> said:
> > > On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:
> > > This version creates the git.spec from a git.spec.in with the version
> > > number from the Makefile.
> > Please don't. The spec file /controls/ the building of the package, it
> > can't be generated as part of the build process.
> It certainly can.
Yep. Maybe "can't" was a bit too strong. "Should never be" is right.
> It simply means a structured release process. IOW,
> the git.spec would be generated for a release tarball.
Come on, you have to fix the spec file for the changelog and version by
hand anyway, autoconfiscating it doesn't help one iota there.
And yes, I've seen quite a few packages autogenerating the spec file. As a
result, you /can't/ build the package from pristine sources, you have to
unpack and configure to get enough for building. For me that just isn't
acceptable, as it completely misses the point of RPM.
(You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up
correctly, your idea prevents that).
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 18:58 ` Horst von Brand
@ 2005-05-02 19:06 ` Paul Jakma
2005-05-02 19:13 ` Paul Jakma
2005-05-02 19:08 ` Chris Wright
1 sibling, 1 reply; 8+ messages in thread
From: Paul Jakma @ 2005-05-02 19:06 UTC (permalink / raw)
To: Horst von Brand; +Cc: Chris Wright, Kay Sievers, git, Linus Torvalds
On Mon, 2 May 2005, Horst von Brand wrote:
> And yes, I've seen quite a few packages autogenerating the spec
> file. As a result, you /can't/ build the package from pristine
> sources, you have to unpack and configure to get enough for
> building. For me that just isn't acceptable, as it completely
> misses the point of RPM.
I think maybe you're missing the point of what is sometimes known as
a 'make dist' target. (eg in autoconf type build systems).
> (You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up
> correctly, your idea prevents that).
Then the tarball wasn't of distributable (ie end-user buildable)
source.
regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
Fortune:
"Now this is a totally brain damaged algorithm. Gag me with a smurfette."
-- P. Buhr, Computer Science 354
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 18:58 ` Horst von Brand
2005-05-02 19:06 ` Paul Jakma
@ 2005-05-02 19:08 ` Chris Wright
1 sibling, 0 replies; 8+ messages in thread
From: Chris Wright @ 2005-05-02 19:08 UTC (permalink / raw)
To: Horst von Brand; +Cc: Chris Wright, Kay Sievers, git, Linus Torvalds
* Horst von Brand (vonbrand@inf.utfsm.cl) wrote:
> Chris Wright <chrisw@osdl.org> said:
> > It simply means a structured release process. IOW,
> > the git.spec would be generated for a release tarball.
>
> Come on, you have to fix the spec file for the changelog and version by
> hand anyway, autoconfiscating it doesn't help one iota there.
That's the point, you don't _have_ to do that.
> And yes, I've seen quite a few packages autogenerating the spec file. As a
> result, you /can't/ build the package from pristine sources, you have to
> unpack and configure to get enough for building. For me that just isn't
> acceptable, as it completely misses the point of RPM.
>
> (You can go "rpmbuild -ta whatever-2.3.1.tar.bz2" if the tarball is set up
> correctly, your idea prevents that).
You just place the generated spec file in a release tarball. IOW, your
'release' Makefile target depends on foo.spec, and creates a clean release
tarball with all you need to do an -ta build.
thanks,
-chris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] add git.spec and adapt Makefile for RPM build
2005-05-02 19:06 ` Paul Jakma
@ 2005-05-02 19:13 ` Paul Jakma
0 siblings, 0 replies; 8+ messages in thread
From: Paul Jakma @ 2005-05-02 19:13 UTC (permalink / raw)
To: Horst von Brand; +Cc: git
On Mon, 2 May 2005, Paul Jakma wrote:
> I think maybe you're missing the point of what is sometimes known as a 'make
> dist' target. (eg in autoconf type build systems).
Apologies: /Or/ the project which provided such a tarball missed the
point.
regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
Fortune:
"MacDonald has the gift on compressing the largest amount of words into
the smallest amount of thoughts."
-- Winston Churchill
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-05-02 19:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 10:23 [PATCH] add git.spec and adapt Makefile for RPM build Kay Sievers
2005-05-02 14:52 ` Kay Sievers
2005-05-02 17:41 ` Horst von Brand
2005-05-02 18:39 ` Chris Wright
2005-05-02 18:58 ` Horst von Brand
2005-05-02 19:06 ` Paul Jakma
2005-05-02 19:13 ` Paul Jakma
2005-05-02 19:08 ` Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).