{"thread":{"id":"436","subject":"[PATCH] add git.spec and adapt Makefile for RPM build","startedAt":"2005-05-02T10:23:03Z","lastAt":"2005-05-02T14:52:55Z","messageCount":2,"participants":["Kay Sievers"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2361","messageId":"20050502102303.GA22630@vrfy.org","threadId":"436","inReplyTo":null,"subject":"[PATCH] add git.spec and adapt Makefile for RPM build","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2005-05-02T10:23:03Z","receivedAt":"2005-05-02T10:23:03Z","isPatch":true,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"Add support for building the rpm package directly from the git tree.\n\nSigned-off-by: Kay Sievers <kay.sievers@vrfy.org>\n---\n\n--- a/Makefile\n+++ b/Makefile\n@@ -7,6 +7,10 @@\n # BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n # break unless your underlying filesystem supports those sub-second times\n # (my ext3 doesn't).\n+\n+prefix=$(HOME)\n+bindir=$(prefix)/bin\n+\n CFLAGS=-g -O2 -Wall\n \n CC=gcc\n@@ -26,7 +30,11 @@ PROG=   git-update-cache git-diff-files \n all: $(PROG)\n \n install: $(PROG) $(SCRIPTS)\n-\tinstall $(PROG) $(SCRIPTS) $(HOME)/bin/\n+\tinstall -m755 -d $(DESTDIR)$(bindir)\n+\tinstall $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)\n+\n+uninstall:\n+\tcd $(DESTDIR)$(bindir) && rm $(PROG) $(SCRIPTS)\n \n LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \\\n \t tag.o date.o\nCreated: git.spec (mode:100644)\n--- /dev/null\n+++ b/git.spec\n@@ -0,0 +1,44 @@\n+Name: \t\tgit\n+Version: \t0.7\n+Release: \t1\n+Vendor: \tLinus Torvalds <torvalds@osdl.org>\n+Summary:  \tgit\n+License: \tGPL\n+Group: \t\tDevelopment/Tools\n+URL: \t\thttp://www.kernel.org/pub/software/scm/git/\n+Source: \thttp://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2\n+Provides: \tgit = %{version}\n+BuildRequires:\tzlib-devel openssl-devel curl-devel\n+BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n+Prereq: \tsh-utils diffutils\n+\n+%description\n+git is an fast and flexible filesystem-based database designed to store directory\n+trees with regard to their history. It is the base for SCM tools bild on top of\n+git like cogito.\n+\n+%prep\n+%setup -q -n %{name}-%{version}\n+\n+%build\n+\n+make\n+\n+%install\n+rm -rf $RPM_BUILD_ROOT\n+make DESTDIR=$RPM_BUILD_ROOT prefix=/usr install\n+\n+%clean\n+rm -rf $RPM_BUILD_ROOT\n+\n+%files\n+%defattr(-,root,root)\n+/usr/bin/*\n+#%{_mandir}/*/*\n+\n+%changelog\n+* Thu May 2 2005 Kay Sievers <kay.sievers@vrfy.org> 0.7-1\n+- rpm build for core git\n+\n+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1\n+- Initial rpm build\n\n"},{"id":"2362","messageId":"20050502145255.GA26439@vrfy.org","threadId":"436","inReplyTo":"20050502102303.GA22630@vrfy.org","subject":"Re: [PATCH] add git.spec and adapt Makefile for RPM build","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2005-05-02T14:52:55Z","receivedAt":"2005-05-02T14:52:55Z","isPatch":true,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Mon, May 02, 2005 at 12:23:03PM +0200, Kay Sievers wrote:\n> Add support for building the rpm package directly from the git tree.\n\nThis version creates the git.spec from a git.spec.in with the version\nnumber from the Makefile.\n\nSigned-off-by: Kay Sievers <kay.sievers@vrfy.org>\n---\n\n--- a/Makefile\n+++ b/Makefile\n@@ -7,6 +7,12 @@\n # BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n # break unless your underlying filesystem supports those sub-second times\n # (my ext3 doesn't).\n+\n+VERSION = 0.7\n+\n+prefix=$(HOME)\n+bindir=$(prefix)/bin\n+\n CFLAGS=-g -O2 -Wall\n \n CC=gcc\n@@ -25,8 +31,15 @@ PROG=   git-update-cache git-diff-files \n \n all: $(PROG)\n \n+git.spec: git.spec.in Makefile\n+\tsed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@\n+\n install: $(PROG) $(SCRIPTS)\n-\tinstall $(PROG) $(SCRIPTS) $(HOME)/bin/\n+\tinstall -m755 -d $(DESTDIR)$(bindir)\n+\tinstall $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)\n+\n+uninstall:\n+\tcd $(DESTDIR)$(bindir) && rm $(PROG) $(SCRIPTS)\n \n LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \\\n \t tag.o date.o\n@@ -110,7 +123,7 @@ diff.o: $(LIB_H)\n strbuf.o: $(LIB_H)\n \n clean:\n-\trm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)\n+\trm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE) git.spec\n \n backup: clean\n \tcd .. ; tar czvf dircache.tar.gz dir-cache\nCreated: git.spec.in (mode:100644)\n--- /dev/null\n+++ b/git.spec.in\n@@ -0,0 +1,44 @@\n+Name: \t\tgit\n+Version: \t@@VERSION@@\n+Release: \t1\n+Vendor: \tLinus Torvalds <torvalds@osdl.org>\n+Summary:  \tgit\n+License: \tGPL\n+Group: \t\tDevelopment/Tools\n+URL: \t\thttp://www.kernel.org/pub/software/scm/git/\n+Source: \thttp://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2\n+Provides: \tgit = %{version}\n+BuildRequires:\tzlib-devel openssl-devel curl-devel\n+BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n+Prereq: \tsh-utils diffutils\n+\n+%description\n+git is an fast and flexible filesystem-based database designed to store directory\n+trees with regard to their history. It is the base for SCM tools bild on top of\n+git like cogito.\n+\n+%prep\n+%setup -q -n %{name}-%{version}\n+\n+%build\n+\n+make\n+\n+%install\n+rm -rf $RPM_BUILD_ROOT\n+make DESTDIR=$RPM_BUILD_ROOT prefix=/usr install\n+\n+%clean\n+rm -rf $RPM_BUILD_ROOT\n+\n+%files\n+%defattr(-,root,root)\n+/usr/bin/*\n+#%{_mandir}/*/*\n+\n+%changelog\n+* Thu May 2 2005 Kay Sievers <kay.sievers@vrfy.org> 0.7-1\n+- rpm build for core git\n+\n+* Thu Apr 21 2005 Chris Wright <chrisw@osdl.org> 0.6.3-1\n+- Initial rpm build\n\n"}]}