| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- ##
- ## openpkg-registry.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://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: openpkg-registry
- Summary: OpenPKG Registry
- URL: http://www.openpkg.org/
- Vendor: OpenPKG
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: PLUS
- Group: Bootstrapping
- License: BSD-style
- Version: 1.1.3
- Release: 20070824
- # package options
- %option with_client yes
- %option with_server no
- # list of sources
- Source0: ftp://ftp.openpkg.org/sources/CPY/openpkg-registry/openpkg-registry-%{version}.tar.gz
- Source1: rc.openpkg-registry
- Patch0: openpkg-registry.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823
- PreReq: OpenPKG, openpkg >= 20060823
- %if "%{with_server}" == "yes"
- PreReq: perl-dbi::with_dbd_sqlite, perl-dbi::with_dbd_pgsql
- PreReq: postgresql
- PreReq: apache-perl
- PreReq: perl-www >= perl-www-5.8.7-20051031
- PreReq: perl-xml
- PreReq: cfg, cfg::with_perl = yes
- PreReq: uuid, uuid::with_perl = yes
- # PreReq: ase FIXME production
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- This package contains client and server parts to build a registry
- %track
- prog openpkg-registry = {
- version = %{version}
- url = ftp://ftp.openpkg.org/sources/CPY/openpkg-registry/
- regex = openpkg-registry-(__VER__)\.tar\.gz
- }
- %prep
- %setup
- %patch -p0
- %build
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg-tools
- %if "%{with_client}" == "yes"
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- register.sh rpm.sh \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg-tools/
- touch \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.conf \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.prep \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.tran \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.util
- chmod 644 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.conf \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.prep \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.tran \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg/register.util
- %endif
- %if "%{with_server}" == "yes"
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg-registry \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg-registry \
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
- $RPM_BUILD_ROOT%{l_prefix}/cgi/openpkg-registry \
- $RPM_BUILD_ROOT%{l_prefix}/var/openpkg-registry/db \
- $RPM_BUILD_ROOT%{l_prefix}/var/openpkg-registry/ui \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- registry.pm \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/openpkg-registry/
- %{l_shtool} install -c -m 640 %{l_value -s -a} \
- registry.cfg *.dat \
- $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg-registry/
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- registry-db.pl \
- $RPM_BUILD_ROOT%{l_prefix}/sbin/registry-db
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- registry-ui.pl ase.pm \
- $RPM_BUILD_ROOT%{l_prefix}/cgi/openpkg-registry/
- %{l_shtool} install -c -m 644 \
- *.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.openpkg-registry} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- %endif
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- %if "%{with_server}" == "yes"
- '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/openpkg-registry/db' \
- '%attr(775,%{l_musr},%{l_ngrp}) %dir %{l_prefix}/var/openpkg-registry/ui' \
- '%attr(640,%{l_musr},%{l_ngrp}) %config %{l_prefix}/etc/openpkg-registry/*' \
- %endif
- '%ghost %{l_prefix}/etc/openpkg/register.conf' \
- '%ghost %{l_prefix}/etc/openpkg/register.prep' \
- '%ghost %{l_prefix}/etc/openpkg/register.tran' \
- '%ghost %{l_prefix}/etc/openpkg/register.util'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %if "%{with_server}" == "yes"
- %post
- if [ $1 -eq 1 ]; then
- # display final hints on initial installation
- ( echo "1. To complete this installation of OpenPKG Registry please configure it,"
- echo " start PostgreSQL and initialize the OpenPKG Registry database like this:"
- echo " \$ vi $RPM_INSTALL_PREFIX/etc/openpkg-registry/registry.cfg"
- echo " # $RPM_INSTALL_PREFIX/bin/openpkg rc postgresql start"
- echo " \$ $RPM_INSTALL_PREFIX/sbin/registry-db setup"
- echo ""
- echo "2. After this postinstallation, adjust config and start Apache like this:"
- echo " # vi $RPM_INSTALL_PREFIX/etc/apache/apache.conf"
- echo " # $RPM_INSTALL_PREFIX/bin/openpkg rc apache start"
- echo " and connect with a browser to:"
- echo " http://127.0.0.1:80/openpkg-cgi/openpkg-registry/registry-ui.pl"
- ) | %{l_rpmtool} msg -b -t notice
- fi
- if [ $1 -eq 2 ]; then
- # display final hints on update installation
- ( echo "Please perform an OpenPKG Registry database upgrade by running"
- echo " \$ $RPM_INSTALL_PREFIX/sbin/registry-db setup"
- ) | %{l_rpmtool} msg -b -t notice
- fi
- exit 0
- %endif
|