| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- ##
- ## fossil.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## 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_opkg 20090828
- %define V_dist 20090828225927
- # package information
- Name: fossil
- Summary: Distributed Version Control System
- URL: http://www.fossil-scm.org/
- Vendor: D. Richard Hipp
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: SCM
- License: GPL
- Version: %{V_opkg}
- Release: 20090830
- # list of sources
- Source0: http://www.fossil-scm.org/download/fossil-src-%{V_dist}.tar.gz
- Source1: fossil.cgi
- Patch0: fossil.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823
- PreReq: OpenPKG, openpkg >= 20060823
- AutoReq: no
- AutoReqProv: no
- %description
- Fossil is a distributed software revision control system that
- includes an integrated Wiki and an integrated Bug-Tracking system,
- all in a single, easy-to-use, stand-alone executable. It stores its
- repositories in a single SQLite database.
- %track
- prog fossil = {
- version = %{V_dist}
- url = http://www.fossil-scm.org/download.html
- regex = fossil-src-(\d+)\.tar\.gz
- }
- %prep
- %setup -q -n fossil-src-%{V_dist}
- %patch -p0
- %build
- libs="-lz"
- case "%{l_platform -t}" in
- *-sunos* ) libs="$libs -lrt -lsocket -lnsl" ;;
- esac
- %{l_make} %{l_mflags} \
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O} %{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- LIBS="$libs"
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/cgi \
- $RPM_BUILD_ROOT%{l_prefix}/var/fossil
- %{l_shtool} install -c -s -m 755 \
- fossil $RPM_BUILD_ROOT%{l_prefix}/bin/
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE fossil.cgi} $RPM_BUILD_ROOT%{l_prefix}/cgi/fossil
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%dir %attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/fossil'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- if [ ".$1" = .1 ]; then
- su - %{l_nusr} -c \
- "LC_CTYPE=C; export LC_CTYPE; umask 077; \
- rm -f $RPM_INSTALL_PREFIX/var/fossil/fossil.db; \
- $RPM_INSTALL_PREFIX/bin/fossil new \
- $RPM_INSTALL_PREFIX/var/fossil/fossil.db" 2>&1
- ( echo "The Fossil repository can be reached under the URL"
- echo " http://localhost/openpkg-cgi/fossil"
- echo "In order to operate with it you have to create users in it."
- echo "For this either use the Web interface under Setup->User or"
- echo "configure the repository from the command-line:"
- echo " $RPM_INSTALL_PREFIX/bin/fossil user new setup"
- echo " $RPM_INSTALL_PREFIX/bin/fossil user capabilities setup 's'"
- echo " $RPM_INSTALL_PREFIX/bin/fossil user default setup"
- ) | %{l_rpmtool} msg -b -t notice
- fi
- exit 0
- %preun
- if [ $1 -eq 0 ]; then
- rm -f $RPM_INSTALL_PREFIX/var/fossil/* >/dev/null 2>&1 || true
- fi
- exit 0
|