## ## git.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. ## Copyright (c) 2000-2007 Ralf S. Engelschall ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package version %define V_git 1.5.3.6 %define V_cogito 0.18.2 %define V_stgit 0.13 %define V_guilt 0.28 # package information Name: git Summary: Distributed Version Control System URL: http://git.or.cz/ Vendor: Linus Torvalds, Junio C Hamano Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: EVAL Group: SCM License: GPL Version: %{V_git} Release: 20071121 # package options %option with_cogito yes %option with_stgit yes %option with_guilt yes # list of sources Source0: http://www.kernel.org/pub/software/scm/git/git-%{V_git}.tar.gz Source1: http://www.kernel.org/pub/software/scm/cogito/cogito-%{V_cogito}.tar.gz Source2: http://homepage.ntlworld.com/cmarinas/stgit/stgit-%{V_stgit}.tar.gz Source3: http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-%{V_guilt}.tar.gz Patch0: git.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, bash, python, perl, gcc, make, perl-openpkg PreReq: OpenPKG, openpkg >= 20040130, bash, python, perl, diffutils, rcs BuildPreReq: zlib, openssl, curl, expat, libiconv PreReq: zlib, openssl, curl, expat, libiconv AutoReq: no AutoReqProv: no %description GIT is a "directory content manager" designed to handle absolutely massive projects with speed and efficiency. GIT falls in the category of distributed source code management tools. Every GIT working directory is a full-fledged repository with full revision tracking capabilities, not dependent on network access to a central server. This package contains both the low-level GIT core components and optionally the high-level GIT frontends Cogito, StGIT and Guilt. %track prog git:git = { version = %{V_git} url = http://www.kernel.org/pub/software/scm/git/ regex = git-(\d+(\.\d+)+)\.tar\.gz } prog git:cogito = { version = %{V_cogito} url = http://www.kernel.org/pub/software/scm/cogito/ regex = cogito-(__VER__)\.tar\.gz } prog git:stgit = { version = %{V_stgit} url = http://homepage.ntlworld.com/cmarinas/stgit/ regex = stgit-(__VER__)\.tar\.gz } prog git:guilt = { version = %{V_guilt} url = http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/ regex = guilt-(__VER__)\.tar\.gz } %prep %setup -q -c %setup -q -T -D -a 1 %setup -q -T -D -a 2 %setup -q -T -D -a 3 %patch -p0 %build # build GIT core ( cd git-%{V_git} libs="-liconv" case "%{l_platform -t}" in *-linux* ) libs="$libs -ldl" ;; esac ( echo "CC := %{l_cc}" echo "ALL_CFLAGS := %{l_cflags -O} %{l_cppflags} \$(ALL_CFLAGS)" echo "ALL_LDFLAGS := %{l_ldflags} \$(ALL_LDFLAGS) $libs" echo "INSTALL = %{l_shtool} install -c" echo "TAR = %{l_tar}" echo "CURLDIR = %{l_prefix}" echo "OPENSSLDIR = %{l_prefix}" echo "SHELL_PATH = %{l_prefix}/bin/bash" echo "PERL_PATH = %{l_prefix}/bin/perl" echo "PYTHON_PATH = %{l_prefix}/bin/python" echo "GITWEB_CONFIG = %{l_prefix}/etc/git/gitweb.config.pl" echo "GITWEB_BASE_URL = /openpkg-cgi/gitweb.d" echo "GITWEB_CSS = /openpkg-cgi/gitweb.d/gitweb.css" echo "GITWEB_LOGO = /openpkg-cgi/gitweb.d/git-logo.png" echo "GITWEB_FAVICON = /openpkg-cgi/gitweb.d/git-favicon.png" echo "GITWEB_PROJECTROOT = %{l_prefix}/var/git" echo "prefix = %{l_prefix}" ) >config.mak %{l_make} %{l_mflags} ) || exit $? # build Cogito frontend %if "%{with_cogito}" == "yes" ( cd cogito-%{V_cogito} %{l_make} %{l_mflags} \ prefix=%{l_prefix} ) || exit $? %endif # install Guilt add-on %if "%{with_guilt}" == "yes" ( cd guilt-%{V_guilt} %{l_shtool} subst \ -e 's;/bin/bash;%{l_prefix}/bin/bash;g' \ guilt* ) || exit $? %endif %install rm -rf $RPM_BUILD_ROOT # install GIT core ( cd git-%{V_git} %{l_make} %{l_mflags} install \ DESTDIR=$RPM_BUILD_ROOT ) || exit $? # install GIT web interface %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d \ $RPM_BUILD_ROOT%{l_prefix}/etc/git %{l_shtool} install -c -m 755 \ git-%{V_git}/gitweb/gitweb.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/ %{l_shtool} install -c -m 755 \ git-%{V_git}/gitweb/gitweb.css \ git-%{V_git}/gitweb/git-favicon.png \ git-%{V_git}/gitweb/git-logo.png \ $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d/ ( echo "##" echo "## gitweb.config.pl -- gitweb Perl configuration " echo "##" echo "" echo "1;" ) >gitweb.config.pl %{l_shtool} install -c -m 755 \ gitweb.config.pl $RPM_BUILD_ROOT%{l_prefix}/etc/git/ # install GIT bash programmable completion %{l_shtool} install -c -m 644 \ git-%{V_git}/contrib/completion/git-completion.bash \ $RPM_BUILD_ROOT%{l_prefix}/etc/git/git.bashrc # install Cogito frontend %if "%{with_cogito}" == "yes" ( cd cogito-%{V_cogito} %{l_make} %{l_mflags} install \ INSTALL="%{l_shtool} install" \ DESTDIR=$RPM_BUILD_ROOT \ prefix=%{l_prefix} ) || exit $? %endif # install StGIT add-on %if "%{with_stgit}" == "yes" ( cd stgit-%{V_stgit} %{l_prefix}/bin/python setup.py install \ --root=$RPM_BUILD_ROOT \ --prefix=%{l_prefix} \ --install-lib=%{l_prefix}/lib/git ) || exit $? %endif # install Guilt add-on %if "%{with_guilt}" == "yes" ( cd guilt-%{V_guilt} %{l_make} %{l_mflags} install \ PREFIX=$RPM_BUILD_ROOT%{l_prefix} ) || exit $? %endif # strip down installation strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc # determine installation files %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} `cat perl-openpkg-files` \ '%config %{l_prefix}/etc/git/*' %files -f files %clean rm -rf $RPM_BUILD_ROOT