Tue, 28 Aug 2012 18:29:00 +0200
Massively update modules from Drupal 6.x to 7.x, and add diverse OpenID modules.
Unfortunately many modules available to Drupal 6.x installations have not been
since maintained or ported to 7.x causing this package to diminish in both size
and utility.
michael@516 | 1 | ## |
michael@516 | 2 | ## git.spec -- OpenPKG RPM Package Specification |
michael@516 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@516 | 4 | ## |
michael@516 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@516 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@516 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@516 | 8 | ## copies. |
michael@516 | 9 | ## |
michael@516 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@516 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@516 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@516 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@516 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@516 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@516 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@516 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@516 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@516 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@516 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@516 | 21 | ## SUCH DAMAGE. |
michael@516 | 22 | ## |
michael@516 | 23 | |
michael@516 | 24 | # package version |
michael@516 | 25 | %define V_git 1.7.11.4 |
michael@516 | 26 | %define V_cogito 0.18.2 |
michael@516 | 27 | %define V_stgit 0.14.3 |
michael@516 | 28 | %define V_guilt 0.35 |
michael@516 | 29 | %define V_tig 1.0 |
michael@516 | 30 | %define V_gcutils 0.2.3 |
michael@516 | 31 | |
michael@516 | 32 | # package information |
michael@516 | 33 | Name: git |
michael@516 | 34 | Summary: Distributed Version Control System |
michael@516 | 35 | URL: http://git-scm.com/ |
michael@516 | 36 | Vendor: Linus Torvalds, Junio C Hamano |
michael@516 | 37 | Packager: OpenPKG Foundation e.V. |
michael@516 | 38 | Distribution: OpenPKG Community |
michael@516 | 39 | Class: EVAL |
michael@516 | 40 | Group: SCM |
michael@516 | 41 | License: GPL |
michael@516 | 42 | Version: %{V_git} |
michael@517 | 43 | Release: 20120800 |
michael@516 | 44 | |
michael@516 | 45 | # package options |
michael@516 | 46 | %option with_doc no |
michael@516 | 47 | %option with_cogito no |
michael@516 | 48 | %option with_stgit no |
michael@516 | 49 | %option with_guilt no |
michael@516 | 50 | %option with_tig no |
michael@516 | 51 | %option with_gcutils no |
michael@516 | 52 | %option with_svn no |
michael@516 | 53 | |
michael@516 | 54 | # list of sources |
michael@516 | 55 | Source0: http://git-core.googlecode.com/files/git-%{V_git}.tar.gz |
michael@516 | 56 | Source1: http://www.kernel.org/pub/software/scm/cogito/cogito-%{V_cogito}.tar.gz |
michael@516 | 57 | Source2: http://homepage.ntlworld.com/cmarinas/stgit/stgit-%{V_stgit}.tar.gz |
michael@516 | 58 | Source3: http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/guilt-%{V_guilt}.tar.gz |
michael@516 | 59 | Source4: http://jonas.nitro.dk/tig/releases/tig-%{V_tig}.tar.gz |
michael@516 | 60 | Source5: http://switch.dl.sourceforge.net/gcutils/gcutils-v%{V_gcutils}.tar.gz |
michael@516 | 61 | Source6: rc.git |
michael@516 | 62 | Source7: git-notify |
michael@516 | 63 | Patch0: git.patch |
michael@516 | 64 | |
michael@516 | 65 | # build information |
michael@516 | 66 | BuildPreReq: OpenPKG, openpkg >= 20100101 |
michael@516 | 67 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@516 | 68 | BuildPreReq: gcc, make, perl-openpkg |
michael@516 | 69 | %if "%{with_doc}" == "yes" |
michael@516 | 70 | BuildPreReq: asciidoc, xmlto |
michael@516 | 71 | %endif |
michael@516 | 72 | BuildPreReq: bash, perl, diffutils |
michael@516 | 73 | PreReq: bash, perl, diffutils |
michael@516 | 74 | BuildPreReq: zlib, openssl, curl, expat, libiconv, pcre |
michael@516 | 75 | PreReq: zlib, openssl, curl, expat, libiconv, pcre |
michael@516 | 76 | BuildPreReq: python |
michael@516 | 77 | PreReq: python |
michael@516 | 78 | %if "%{with_tig}" == "yes" |
michael@516 | 79 | BuildPreReq: ncurses |
michael@516 | 80 | PreReq: ncurses |
michael@516 | 81 | %endif |
michael@516 | 82 | %if "%{with_gcutils}" == "yes" |
michael@516 | 83 | BuildPreReq: gzip |
michael@516 | 84 | %endif |
michael@516 | 85 | %if "%{with_svn}" == "yes" |
michael@516 | 86 | PreReq: subversion-perl |
michael@516 | 87 | %endif |
michael@516 | 88 | |
michael@516 | 89 | %description |
michael@516 | 90 | GIT is a "directory content manager" designed to handle absolutely |
michael@516 | 91 | massive projects with speed and efficiency. GIT falls in the |
michael@516 | 92 | category of distributed source code management tools. Every GIT |
michael@516 | 93 | working directory is a full-fledged repository with full revision |
michael@516 | 94 | tracking capabilities, not dependent on network access to a central |
michael@516 | 95 | server. |
michael@516 | 96 | |
michael@516 | 97 | This package contains both the low-level GIT core components and |
michael@516 | 98 | optionally the high-level GIT frontends Cogito, StGIT and Guilt. |
michael@516 | 99 | |
michael@516 | 100 | %track |
michael@516 | 101 | prog git:git = { |
michael@516 | 102 | version = %{V_git} |
michael@516 | 103 | url = http://code.google.com/p/git-core/downloads/list |
michael@516 | 104 | regex = git-(\d+(\.\d+)+)\.tar\.gz |
michael@516 | 105 | } |
michael@516 | 106 | prog git:cogito = { |
michael@516 | 107 | version = %{V_cogito} |
michael@516 | 108 | url = http://www.kernel.org/pub/software/scm/cogito/ |
michael@516 | 109 | regex = cogito-(__VER__)\.tar\.gz |
michael@516 | 110 | } |
michael@516 | 111 | prog git:stgit = { |
michael@516 | 112 | version = %{V_stgit} |
michael@516 | 113 | url = http://homepage.ntlworld.com/cmarinas/stgit/ |
michael@516 | 114 | regex = stgit-(__VER__)\.tar\.gz |
michael@516 | 115 | } |
michael@516 | 116 | prog git:guilt = { |
michael@516 | 117 | version = %{V_guilt} |
michael@516 | 118 | url = http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/ |
michael@516 | 119 | regex = guilt-(__VER__)\.tar\.gz |
michael@516 | 120 | } |
michael@516 | 121 | prog git:tig = { |
michael@516 | 122 | version = %{V_tig} |
michael@516 | 123 | url = http://jonas.nitro.dk/tig/releases/ |
michael@516 | 124 | regex = tig-(__VER__)\.tar\.gz |
michael@516 | 125 | } |
michael@516 | 126 | prog git:gcutils = { |
michael@516 | 127 | version = %{V_gcutils} |
michael@516 | 128 | url = http://sourceforge.net/projects/gcutils/files/ |
michael@516 | 129 | regex = gcutils-v(__VER__)\.tar\.gz |
michael@516 | 130 | } |
michael@516 | 131 | |
michael@516 | 132 | %prep |
michael@516 | 133 | %setup -q -c |
michael@516 | 134 | %setup -q -T -D -a 1 |
michael@516 | 135 | %setup -q -T -D -a 2 |
michael@516 | 136 | %setup -q -T -D -a 3 |
michael@516 | 137 | %setup -q -T -D -a 4 |
michael@516 | 138 | %setup -q -T -D -a 5 |
michael@516 | 139 | %patch -p0 |
michael@516 | 140 | |
michael@516 | 141 | %build |
michael@516 | 142 | # build GIT core |
michael@516 | 143 | ( cd git-%{V_git} |
michael@516 | 144 | find . -name "*.[ch]" -print |\ |
michael@516 | 145 | xargs %{l_shtool} subst \ |
michael@516 | 146 | -e 's;struct option;struct git_option;g' |
michael@516 | 147 | ( echo "GITWEB_CONFIG = %{l_prefix}/etc/git/gitweb.config.pl" |
michael@516 | 148 | echo "GITWEB_BASE_URL = /openpkg-cgi/gitweb.d" |
michael@516 | 149 | echo "GITWEB_CSS = /openpkg-cgi/gitweb.d/static/gitweb.css" |
michael@516 | 150 | echo "GITWEB_JS = /openpkg-cgi/gitweb.d/static/gitweb.js" |
michael@516 | 151 | echo "GITWEB_LOGO = /openpkg-cgi/gitweb.d/static/git-logo.png" |
michael@516 | 152 | echo "GITWEB_FAVICON = /openpkg-cgi/gitweb.d/static/git-favicon.png" |
michael@516 | 153 | echo "GITWEB_PROJECTROOT = %{l_prefix}/var/git" |
michael@516 | 154 | echo "PYTHON_PATH = %{l_prefix}/bin/python" |
michael@516 | 155 | echo "NEEDS_CRYPTO_WITH_SSL = YesPlease" |
michael@516 | 156 | ) >config.mak |
michael@516 | 157 | ( echo "ac_cv_header_libintl_h=no" |
michael@516 | 158 | ) >config.cache |
michael@516 | 159 | CC="%{l_cc}" \ |
michael@516 | 160 | CFLAGS="%{l_cflags -O}" \ |
michael@516 | 161 | CPPFLAGS="%{l_cppflags}" \ |
michael@516 | 162 | LDFLAGS="%{l_ldflags}" \ |
michael@516 | 163 | LIBS="-lssl -lcrypto -lz" \ |
michael@516 | 164 | ./configure \ |
michael@516 | 165 | --cache-file=./config.cache \ |
michael@516 | 166 | --prefix=%{l_prefix} \ |
michael@516 | 167 | --mandir=%{l_prefix}/man \ |
michael@516 | 168 | --with-gitconfig=%{l_prefix}/etc/git/gitconfig \ |
michael@516 | 169 | --with-gitattributes=%{l_prefix}/etc/git/gitattributes \ |
michael@516 | 170 | --with-openssl=%{l_prefix} \ |
michael@516 | 171 | --with-libpcre=%{l_prefix} \ |
michael@516 | 172 | --with-curl=%{l_prefix} \ |
michael@516 | 173 | --with-expat=%{l_prefix} \ |
michael@516 | 174 | --with-iconv=%{l_prefix} \ |
michael@516 | 175 | --with-zlib=%{l_prefix} \ |
michael@516 | 176 | --with-shell=%{l_prefix}/bin/bash \ |
michael@516 | 177 | --with-perl=%{l_prefix}/bin/perl \ |
michael@516 | 178 | --without-python \ |
michael@516 | 179 | --without-tcltk \ |
michael@516 | 180 | --disable-pthreads |
michael@517 | 181 | %{l_make} %{l_mflags -O} |
michael@516 | 182 | %if "%{with_doc}" == "yes" |
michael@516 | 183 | ( cd Documentation |
michael@516 | 184 | %{l_make} %{l_mflags} man |
michael@516 | 185 | ) || exit $? |
michael@516 | 186 | %endif |
michael@516 | 187 | ) || exit $? |
michael@516 | 188 | |
michael@516 | 189 | # build Cogito frontend |
michael@516 | 190 | %if "%{with_cogito}" == "yes" |
michael@516 | 191 | ( cd cogito-%{V_cogito} |
michael@516 | 192 | %{l_make} %{l_mflags} \ |
michael@516 | 193 | prefix=%{l_prefix} |
michael@516 | 194 | ) || exit $? |
michael@516 | 195 | %endif |
michael@516 | 196 | |
michael@516 | 197 | # build Guilt add-on |
michael@516 | 198 | %if "%{with_guilt}" == "yes" |
michael@516 | 199 | ( cd guilt-%{V_guilt} |
michael@516 | 200 | %{l_shtool} subst \ |
michael@516 | 201 | -e 's;/bin/sh;%{l_prefix}/bin/bash;g' \ |
michael@516 | 202 | guilt* |
michael@516 | 203 | ) || exit $? |
michael@516 | 204 | %endif |
michael@516 | 205 | |
michael@516 | 206 | # build Tig add-on |
michael@516 | 207 | %if "%{with_tig}" == "yes" |
michael@516 | 208 | ( cd tig-%{V_tig} |
michael@516 | 209 | CC="%{l_cc}" \ |
michael@516 | 210 | CFLAGS="%{l_cflags -O}" \ |
michael@516 | 211 | CPPFLAGS="%{l_cppflags ncurses .}" \ |
michael@516 | 212 | LDFLAGS="%{l_ldflags}" \ |
michael@516 | 213 | ./configure \ |
michael@516 | 214 | --prefix=%{l_prefix} \ |
michael@516 | 215 | --mandir=%{l_prefix}/man \ |
michael@516 | 216 | --with-libiconv=%{l_prefix} |
michael@516 | 217 | %{l_make} %{l_mflags} |
michael@516 | 218 | ) || exit $? |
michael@516 | 219 | %endif |
michael@516 | 220 | |
michael@516 | 221 | # build GC-Utils add-on |
michael@516 | 222 | %if "%{with_gcutils}" == "yes" |
michael@516 | 223 | ( cd gc-utils |
michael@516 | 224 | %{l_make} %{l_mflags} \ |
michael@516 | 225 | prefix=%{l_prefix} \ |
michael@516 | 226 | mandir=%{l_prefix}/man |
michael@516 | 227 | ) || exit $? |
michael@516 | 228 | %endif |
michael@516 | 229 | |
michael@516 | 230 | %install |
michael@516 | 231 | # install GIT core |
michael@516 | 232 | ( cd git-%{V_git} |
michael@516 | 233 | %{l_make} %{l_mflags} install \ |
michael@517 | 234 | INSTALL="%{l_shtool} install -c" \ |
michael@516 | 235 | DESTDIR=$RPM_BUILD_ROOT |
michael@516 | 236 | %if "%{with_doc}" == "yes" |
michael@516 | 237 | ( cd Documentation |
michael@516 | 238 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@516 | 239 | $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ |
michael@516 | 240 | $RPM_BUILD_ROOT%{l_prefix}/man/man5 \ |
michael@516 | 241 | $RPM_BUILD_ROOT%{l_prefix}/man/man7 |
michael@516 | 242 | %{l_shtool} install -c -m 644 \ |
michael@516 | 243 | *.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
michael@516 | 244 | %{l_shtool} install -c -m 644 \ |
michael@516 | 245 | *.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ |
michael@516 | 246 | %{l_shtool} install -c -m 644 \ |
michael@516 | 247 | *.7 $RPM_BUILD_ROOT%{l_prefix}/man/man7/ |
michael@516 | 248 | ) || exit $? |
michael@516 | 249 | %endif |
michael@516 | 250 | %if "%{with_svn}" != "yes" |
michael@516 | 251 | rm -f $RPM_BUILD_ROOT%{l_prefix}/libexec/git/git-svn |
michael@516 | 252 | %endif |
michael@516 | 253 | ) || exit $? |
michael@516 | 254 | |
michael@516 | 255 | # install git-notify(1) addon utility |
michael@516 | 256 | %{l_shtool} install -c -m 755 \ |
michael@516 | 257 | -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \ |
michael@516 | 258 | %{SOURCE git-notify} \ |
michael@516 | 259 | $RPM_BUILD_ROOT%{l_prefix}/bin/ |
michael@516 | 260 | |
michael@516 | 261 | # install GIT web interface |
michael@516 | 262 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@516 | 263 | $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d/static \ |
michael@516 | 264 | $RPM_BUILD_ROOT%{l_prefix}/etc/git |
michael@516 | 265 | %{l_shtool} install -c -m 755 \ |
michael@516 | 266 | git-%{V_git}/gitweb/gitweb.cgi $RPM_BUILD_ROOT%{l_prefix}/cgi/ |
michael@516 | 267 | %{l_shtool} install -c -m 644 \ |
michael@516 | 268 | git-%{V_git}/gitweb/static/* \ |
michael@516 | 269 | $RPM_BUILD_ROOT%{l_prefix}/cgi/gitweb.d/static/ |
michael@516 | 270 | ( echo "##" |
michael@516 | 271 | echo "## gitweb.config.pl -- gitweb Perl configuration " |
michael@516 | 272 | echo "##" |
michael@516 | 273 | echo "" |
michael@516 | 274 | echo "1;" |
michael@516 | 275 | ) >gitweb.config.pl |
michael@516 | 276 | %{l_shtool} install -c -m 755 \ |
michael@516 | 277 | gitweb.config.pl $RPM_BUILD_ROOT%{l_prefix}/etc/git/ |
michael@516 | 278 | |
michael@516 | 279 | # provide HTTP backend CGI under canonical path for Apache |
michael@516 | 280 | ln $RPM_BUILD_ROOT%{l_prefix}/libexec/git/git-http-backend \ |
michael@516 | 281 | $RPM_BUILD_ROOT%{l_prefix}/cgi/git-http-backend |
michael@516 | 282 | |
michael@516 | 283 | # install GIT bash programmable completion |
michael@516 | 284 | %{l_shtool} install -c -m 644 \ |
michael@516 | 285 | git-%{V_git}/contrib/completion/git-completion.bash \ |
michael@516 | 286 | $RPM_BUILD_ROOT%{l_prefix}/etc/git/git.bashrc |
michael@516 | 287 | |
michael@516 | 288 | # install Cogito frontend |
michael@516 | 289 | %if "%{with_cogito}" == "yes" |
michael@516 | 290 | ( cd cogito-%{V_cogito} |
michael@516 | 291 | %{l_make} %{l_mflags} install \ |
michael@516 | 292 | INSTALL="%{l_shtool} install" \ |
michael@516 | 293 | DESTDIR=$RPM_BUILD_ROOT \ |
michael@516 | 294 | prefix=%{l_prefix} |
michael@516 | 295 | ) || exit $? |
michael@516 | 296 | %endif |
michael@516 | 297 | |
michael@516 | 298 | # install StGIT add-on |
michael@516 | 299 | %if "%{with_stgit}" == "yes" |
michael@516 | 300 | ( cd stgit-%{V_stgit} |
michael@516 | 301 | PATH="`pwd`/../git-%{V_git}:$PATH" |
michael@516 | 302 | %{l_prefix}/bin/python setup.py install \ |
michael@516 | 303 | --root=$RPM_BUILD_ROOT \ |
michael@516 | 304 | --prefix=%{l_prefix} \ |
michael@516 | 305 | --install-lib=%{l_prefix}/lib/git |
michael@516 | 306 | ) || exit $? |
michael@516 | 307 | %endif |
michael@516 | 308 | |
michael@516 | 309 | # install Guilt add-on |
michael@516 | 310 | %if "%{with_guilt}" == "yes" |
michael@516 | 311 | ( cd guilt-%{V_guilt} |
michael@516 | 312 | %{l_make} %{l_mflags} install \ |
michael@516 | 313 | PREFIX=$RPM_BUILD_ROOT%{l_prefix} |
michael@516 | 314 | ) || exit $? |
michael@516 | 315 | %endif |
michael@516 | 316 | |
michael@516 | 317 | # install Tig add-on |
michael@516 | 318 | %if "%{with_tig}" == "yes" |
michael@516 | 319 | ( cd tig-%{V_tig} |
michael@516 | 320 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@516 | 321 | ) || exit $? |
michael@516 | 322 | %endif |
michael@516 | 323 | |
michael@516 | 324 | # install GC-Utils add-on |
michael@516 | 325 | %if "%{with_gcutils}" == "yes" |
michael@516 | 326 | ( cd gc-utils |
michael@516 | 327 | %{l_make} %{l_mflags} \ |
michael@516 | 328 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@516 | 329 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
michael@516 | 330 | install |
michael@516 | 331 | ) || exit $? |
michael@516 | 332 | %endif |
michael@516 | 333 | |
michael@516 | 334 | # install run-command script |
michael@516 | 335 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@516 | 336 | $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
michael@516 | 337 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@516 | 338 | %{SOURCE rc.git} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
michael@516 | 339 | |
michael@516 | 340 | # strip down installation |
michael@516 | 341 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@516 | 342 | strip $RPM_BUILD_ROOT%{l_prefix}/libexec/git-core/* >/dev/null 2>&1 || true |
michael@516 | 343 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc |
michael@516 | 344 | |
michael@516 | 345 | # create additional directories |
michael@516 | 346 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@516 | 347 | $RPM_BUILD_ROOT%{l_prefix}/var/git/run \ |
michael@516 | 348 | $RPM_BUILD_ROOT%{l_prefix}/var/git/db |
michael@516 | 349 | |
michael@516 | 350 | # determine installation files |
michael@516 | 351 | %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup |
michael@516 | 352 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@516 | 353 | %{l_files_std} `cat perl-openpkg-files` \ |
michael@516 | 354 | '%config %{l_prefix}/etc/git/*' \ |
michael@516 | 355 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/git/*' |
michael@516 | 356 | |
michael@516 | 357 | %files -f files |
michael@516 | 358 | |
michael@516 | 359 | %clean |
michael@516 | 360 |