Annotation of /branches/magellan-next/extras/git/git-1.7.6-r1.smage2
Parent Directory | Revision Log
Revision 8488 -
(hide annotations)
(download)
Wed Jul 20 09:43:51 2011 UTC (12 years, 9 months ago) by niro
File size: 3214 byte(s)
Wed Jul 20 09:43:51 2011 UTC (12 years, 9 months ago) by niro
File size: 3214 byte(s)
-fixed gitweb install
1 | niro | 8485 | # $Id$ |
2 | |||
3 | PNAME="git" | ||
4 | PVER="1.7.6" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="dev-util" | ||
8 | |||
9 | DESCRIPTION="Git - Fast Version Control System." | ||
10 | HOMEPAGE="http://git.or.cz/" | ||
11 | |||
12 | DEPEND=">= dev-libs/expat-2 | ||
13 | >= dev-libs/openssl-1.0.0 | ||
14 | >= sys-libs/zlib-1.2.5 | ||
15 | >= app-arch/cpio-2 | ||
16 | >= net-misc/curl-7 | ||
17 | >= dev-lang/perl-5.14 | ||
18 | >= dev-lang/tk-8.5 | ||
19 | >= dev-perl/perl-error-0.17015 | ||
20 | >= dev-perl/perl-cgi-3.48 | ||
21 | >= dev-perl/net-smtp-ssl-1 | ||
22 | >= dev-python/pygtk-2.24 | ||
23 | >= dev-util/tla-1.3.5 | ||
24 | >= dev-util/quilt-0.48" | ||
25 | |||
26 | MANPAGES_SRCFILE="${PNAME}-manpages-${PVER}.tar.bz2" | ||
27 | SRCFILE="${PNAME}-${PVER}.tar.bz2" | ||
28 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
29 | |||
30 | sminclude mtools perl | ||
31 | |||
32 | SRC_URI=( | ||
33 | http://kernel.org/pub/software/scm/${PNAME}/${SRCFILE} | ||
34 | http://kernel.org/pub/software/scm/${PNAME}/${MANPAGES_SRCFILE} | ||
35 | mirror://${PNAME}/${SRCFILE} | ||
36 | mirror://${PNAME}/git-daemon.rc | ||
37 | mirror://${PNAME}/git-daemon.confd | ||
38 | ) | ||
39 | |||
40 | UP2DATE="updatecmd 'http://kernel.org/pub/software/scm/git/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball" | ||
41 | |||
42 | src_prepare() | ||
43 | { | ||
44 | munpack ${SRCFILE} || die | ||
45 | munpack ${MANPAGES_SRCFILE} ${SRCDIR} || die | ||
46 | cd ${SRCDIR} | ||
47 | |||
48 | # we want symbolic links, no hardlinks | ||
49 | sed -i 's:ln :ln -s :g' Makefile || die | ||
50 | |||
51 | # fix CFLAGS and LDFLAGS too | ||
52 | sed -i -e "s:^\(CFLAGS =\).*$:\1 ${CFLAGS} -Wall:" \ | ||
53 | -e "s:^\(LDFLAGS =\).*$:\1 ${LDFLAGS}:" \ | ||
54 | Makefile || die | ||
55 | } | ||
56 | |||
57 | src_compile() | ||
58 | { | ||
59 | cd ${SRCDIR} | ||
60 | mmake prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core || die | ||
61 | |||
62 | # compile gitweb.cgi too | ||
63 | mmake prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core gitweb/gitweb.cgi || die | ||
64 | } | ||
65 | |||
66 | src_install() | ||
67 | { | ||
68 | cd ${SRCDIR} | ||
69 | mmake DESTDIR=${BINDIR} prefix=/usr gitexecdir=$(mlibdir)/${PNAME}/git-core install || die | ||
70 | |||
71 | # install the gtk-gui | ||
72 | minstallexec contrib/gitview/gitview || die | ||
73 | minstalldocs contrib/gitview/gitview.txt || die | ||
74 | |||
75 | # install some nice contribs | ||
76 | minstallexec contrib/fast-import/import-tars.perl /usr/bin/import-tars || die | ||
77 | minstallexec contrib/fast-import/git-p4 || die | ||
78 | minstalldocs contrib/fast-import/git-p4.txt || die | ||
79 | |||
80 | # the following are excluded: (from gentoo) | ||
81 | # svnimport - use git-svn | ||
82 | # p4import - excluded because fast-import has a better one | ||
83 | # examples - these are stuff that is not used in git anymore actually | ||
84 | # patches - stuff the git guys made to go upstream to other places | ||
85 | minstalldir /usr/share/${PNAME}/contrib || die | ||
86 | local i | ||
87 | for i in continuous fast-import hg-to-git \ | ||
88 | hooks remotes2config.sh vim stats \ | ||
89 | workdir convert-objects blameview | ||
90 | do | ||
91 | cp -rf contrib/${i} ${BINDIR}/usr/share/${PNAME}/contrib || die | ||
92 | done | ||
93 | |||
94 | # install git-web | ||
95 | niro | 8488 | mmake -C gitweb DESTDIR=${BINDIR} gitwebdir=/usr/share/${PNAME}/gitweb || die |
96 | niro | 8485 | # prevent overwriting of the docs |
97 | cp gitweb/INSTALL{,.gitweb} || die | ||
98 | cp gitweb/README{,.gitweb} || die | ||
99 | minstalldocs gitweb/INSTALL.gitweb || die | ||
100 | minstalldocs gitweb/README.gitweb || die | ||
101 | |||
102 | # git daemon rc-script | ||
103 | minstallrc git-daemon.rc git-daemon || die | ||
104 | minstallconf git-daemon.confd git-daemon || die | ||
105 | |||
106 | # install all man pages | ||
107 | minstallman man\?/\* || die | ||
108 | |||
109 | # install documentation | ||
110 | minstalldocs README Documentation/{SubmittingPatches,CodingGuidelines} || die | ||
111 | |||
112 | # finally fix perl modules | ||
113 | fixlocalpod | ||
114 | } | ||
115 | |||
116 | postinstall() | ||
117 | { | ||
118 | echo | ||
119 | echo "To use git-web, install an apache-server and point it to '/usr/share/git/gitweb'." | ||
120 | echo | ||
121 | } |