شما نمی توانید بیش از 25 موضوع انتخاب کنید
موضوع میبایستی با حروف یا شماره ها شروع شود. و میتواند شامل دَش ('-') باشد و طول آن تا 35 کارکتر نیز امکانپذیر است.
157 خطوط
5.8 KiB
157 خطوط
5.8 KiB
## |
|
## jitterbug.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH |
|
## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com> |
|
## |
|
## 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 information |
|
Name: jitterbug |
|
Summary: Bug Tracking System (OSSP Version) |
|
URL: http://jitterbug.samba.org/ |
|
Vendor: Andrew Tridgell |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [EXP] |
|
Group: Database |
|
License: GPL |
|
Version: 1.6.2.2 |
|
Release: 20011201.0 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.ossp.org/pkg/jitterbug/ossp-jitterbug-%{version}.tar.gz |
|
Source1: config.tar |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20011126.0, zlib |
|
PreReq: OpenPKG, openpkg >= 20011126.0, MTA, apache, gzip |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
JitterBug is a web based bug tracking system. It was originally |
|
developed by the Andrew Tridgell to handle bug tracking, problem |
|
reports and queries from Samba users. |
|
|
|
%prep |
|
%setup -q -n ossp-jitterbug-%{version} |
|
|
|
%build |
|
CC="%{l_cc}" \ |
|
CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \ |
|
LDFLAGS="-L%{l_prefix}/lib" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--sysconfdir=%{l_prefix}/etc/jitterbug |
|
%{l_rpmtool} subst \ |
|
's;^\(LIBS *=.*\)$;\1 -L%{l_prefix}/lib -lz;' \ |
|
-- Makefile |
|
%{l_make} %{l_mflags -O} |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
tar xvf %{SOURCE config.tar} |
|
( cd config |
|
l_hostname=`%{l_shtool} echo -e %h` |
|
l_domainname=`%{l_shtool} echo -e %d | cut -c2-` |
|
%{l_rpmtool} subst -v \ |
|
"s;@l_hostname@;$l_hostname;g" \ |
|
"s;@l_domainname@;$l_domainname;g" \ |
|
's;@l_prefix@;%{l_prefix};g' \ |
|
's;@l_fsusr@;%{l_fsusr};g' \ |
|
's;@l_fsuid@;%{l_fsuid};g' \ |
|
's;@l_fsgrp@;%{l_fsgrp};g' \ |
|
's;@l_fsgid@;%{l_fsgid};g' \ |
|
's;@l_npusr@;%{l_npusr};g' \ |
|
's;@l_npuid@;%{l_npuid};g' \ |
|
's;@l_npgrp@;%{l_npgrp};g' \ |
|
's;@l_npgid@;%{l_npgid};g' \ |
|
-- `find . -type f -print` |
|
rm -rf */*.orig */.[a-z]*.orig >/dev/null 2>&1 || true |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/jitterbug |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/jitterbug/bugdb |
|
%{l_shtool} install -c -m - etc/* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/jitterbug/ |
|
cp -rp var/* var/.[a-z]* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/jitterbug/bugdb/ |
|
) |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} \ |
|
'%attr(04755,root,%{l_fsgrp}) %{l_prefix}/bin/jitterbug-*' |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
%post |
|
if [ ".$1" = .1 ]; then |
|
# add hook into MTA configuration |
|
aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query mta_aliases_file` |
|
update_command=`$RPM_INSTALL_PREFIX/etc/rc --query mta_aliases_update` |
|
if [ ".$aliases_file" != . ]; then |
|
( echo "bugdb: \"|$RPM_INSTALL_PREFIX/bin/jitterbug-mail bugdb-guest\"" |
|
echo "owner-bugdb: postmaster" |
|
) |\ |
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \ |
|
-a -i "$RPM_INSTALL_PREFIX:jitterbug" $aliases_file |
|
if [ ".$update_command" != . ]; then |
|
eval $update_command |
|
fi |
|
fi |
|
# add hook into Apache configuration |
|
apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" |
|
if [ -f $apacheconf ]; then |
|
( echo "Alias /bugdb $RPM_INSTALL_PREFIX/var/jitterbug/bugdb" |
|
echo "<Directory $RPM_INSTALL_PREFIX/var/jitterbug/bugdb>" |
|
echo " AllowOverride all" |
|
echo "</Directory>" |
|
) |\ |
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \ |
|
-a -i "$RPM_INSTALL_PREFIX:jitterbug" $apacheconf |
|
fi |
|
fi |
|
|
|
%postun |
|
if [ ".$1" = .0 ]; then |
|
# remove hook from MTA configuration |
|
aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query mta_aliases_file` |
|
update_command=`$RPM_INSTALL_PREFIX/etc/rc --query mta_aliases_update` |
|
if [ ".$aliases_file" != . ]; then |
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \ |
|
-r -i "$RPM_INSTALL_PREFIX:jitterbug" $aliases_file |
|
if [ ".$update_command" != . ]; then |
|
eval $update_command |
|
fi |
|
fi |
|
# remove hook from Apache configuration |
|
apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" |
|
if [ -f $apacheconf ]; then |
|
$RPM_INSTALL_PREFIX/sbin/rpmtool config \ |
|
-r -i "$RPM_INSTALL_PREFIX:jitterbug" $apacheconf |
|
fi |
|
fi |
|
|
|
|