git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] add git.spec and adapt Makefile for RPM build

From
KSKay Sievers <kay.sievers@vrfy.org>
Date
May 2, 2005, 10:23 UTC
Message-ID
<20050502102303.GA22630@vrfy.org>
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
Next: Kay Sievers
Message 1 of 2 in “add git.spec and adapt Makefile for RPM build”
  1. add git.spec and adapt Makefile for RPM buildKay Sievers, May 2, 2005
  2. Kay SieversMay 2, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.