{"thread":{"id":"1161","subject":"[GIT PATCH] Add infrastructure for git rpm build","startedAt":"2005-07-07T20:25:39Z","lastAt":"2005-07-07T20:25:39Z","messageCount":1,"participants":["Chris Wright"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"5773","messageId":"20050707202539.GP5324@shell0.pdx.osdl.net","threadId":"1161","inReplyTo":null,"subject":"[GIT PATCH] Add infrastructure for git rpm build","fromName":"Chris Wright","fromEmail":"chrisw@osdl.org","sentAt":"2005-07-07T20:25:39Z","receivedAt":"2005-07-07T20:25:39Z","isPatch":true,"sender":{"key":"chrisw@sous-sol.org","avatar":null},"body":"Linus,\n\nYou'll find the necessary infrastructure for doing an rpm build here:\n\n\tkernel.org/pub/scm/linux/kernel/git/chrisw/git.git\n\nThe diff is below:\n\ndiff-tree a9db297485a7b8c641d3cf686d03cb63b774e530 (from dd7ba8b4949535c24e604a37709db0e3be9ccbbc)\nAuthor: Chris Wright <chrisw@osdl.org>\nDate:   Thu Jul 7 13:09:50 2005 -0700\n\n    Infrastructure for git rpm builds.  Adds GIT_VERSION to Makefile and new make\n    targets: git.spec, dist, and rpm.  A simple 'make rpm' will build the rpm.\n    Also adds git.spec.in which is used to generate git.spec.\n    \n    Signed-off-by: Chris Wright <chrisw@osdl.org>\n\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -9,6 +9,8 @@\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+GIT_VERSION=0.99\n+\n COPTS=-O2\n CFLAGS=-g $(COPTS) -Wall\n \n@@ -49,6 +51,7 @@ PROG=   git-update-cache git-diff-files \n all: $(PROG)\n \n install: $(PROG) $(SCRIPTS)\n+\t$(INSTALL) -m755 -d $(dest)$(bin)\n \t$(INSTALL) $(PROG) $(SCRIPTS) $(dest)$(bin)\n \n LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \\\n@@ -164,6 +167,21 @@ diffcore-break.o : $(LIB_H) diffcore.h\n diffcore-order.o : $(LIB_H) diffcore.h\n epoch.o: $(LIB_H)\n \n+git.spec: git.spec.in\n+\tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n+\n+GIT_TARNAME=git-$(GIT_VERSION)\n+dist: git.spec\n+\tgit-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar\n+\t@mkdir -p $(GIT_TARNAME)\n+\t@cp git.spec $(GIT_TARNAME)\n+\ttar rf $(GIT_TARNAME).tar $(GIT_TARNAME)/git.spec\n+\t@rm -rf $(GIT_TARNAME)\n+\tgzip -9 $(GIT_TARNAME).tar\n+\n+rpm: dist\n+\trpmbuild -ta git-$(GIT_VERSION).tar.gz\n+\n test: all\n \t$(MAKE) -C t/ all\n \ndiff --git a/git.spec.in b/git.spec.in\nnew file mode 100644\n--- /dev/null\n+++ b/git.spec.in\n@@ -0,0 +1,42 @@\n+Name: \t\tgit\n+Version: \t@@VERSION@@\n+Release: \t1\n+Vendor: \tLinus Torvalds <torvalds@osdl.org>\n+Summary:  \tGit core and tools\n+License: \tGPL\n+Group: \t\tDevelopment/Tools\n+URL: \t\thttp://kernel.org/pub/software/scm/git/\n+Source: \thttp://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz\n+BuildRequires:\tzlib-devel, openssl-devel, curl-devel\n+BuildRoot:\t%{_tmppath}/%{name}-%{version}-root\n+Prereq: \tsh-utils, diffutils, rsync, rcs, mktemp >= 1.5\n+\n+%description\n+GIT comes in two layers. The bottom layer is merely an extremely fast\n+and flexible filesystem-based database designed to store directory trees\n+with regard to their history. The top layer is a SCM-like tool which\n+enables human beings to work with the database in a manner to a degree\n+similar to other SCM tools (like CVS, BitKeeper or Monotone).\n+\n+%prep\n+%setup -q\n+\n+%build\n+\n+make\n+\n+%install\n+rm -rf $RPM_BUILD_ROOT\n+make dest=$RPM_BUILD_ROOT prefix=%{_prefix} install\n+\n+%clean\n+rm -rf $RPM_BUILD_ROOT\n+\n+%files\n+%defattr(-,root,root)\n+%{_bindir}/*\n+%doc README COPYING Documentation/*\n+\n+%changelog\n+* Wed Jul 7 2005 Chris Wright <chris@osdl.org>\n+- initial git spec file\n"}]}