浏览代码

new package: openpkg-registry 0.0.16 (OpenPKG Registry)

Thomas Lotterer 20 年之前
父节点
当前提交
593205d12b
共有 1 个文件被更改,包括 147 次插入0 次删除
  1. 147 0
      openpkg-registry/openpkg-registry.spec

+ 147 - 0
openpkg-registry/openpkg-registry.spec

@@ -0,0 +1,147 @@
+##
+##  openpkg-registry.spec -- OpenPKG RPM Package Specification
+##  Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
+##  Copyright (c) 2000-2005 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
+Distribution: OpenPKG
+Class:        EVAL
+Group:        Bootstrapping
+License:      BSD-style
+Version:      0.0.16
+Release:      20051119
+
+#   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
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20040130
+PreReq:       OpenPKG, openpkg >= 20040130
+%if "%{with_server}" == "yes"
+PreReq:       perl-dbi::with_dbd_sqlite, perl-dbi::with_dbd_pgsql
+PreReq:       postgresql
+PreReq:       apache::with_mod_perl
+PreReq:       perl-www, perl-xml
+%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
+
+%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}/sbin \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/openpkg-registry \
+        $RPM_BUILD_ROOT%{l_prefix}/cgi/openpkg-registry \
+        $RPM_BUILD_ROOT%{l_prefix}/var/openpkg-registry/db
+    %{l_shtool} install -c -m 755 %{l_value -s -a} \
+        registry-ui.pl \
+        $RPM_BUILD_ROOT%{l_prefix}/cgi/openpkg-registry/registry-ui.cgi
+    %{l_shtool} install -c -m 755 %{l_value -s -a} \
+        registry-db.pl \
+        $RPM_BUILD_ROOT%{l_prefix}/sbin/openpkg-registry-setup
+%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' \
+%endif
+        %ghost %{l_prefix}/etc/openpkg/register.util \
+        %ghost %{l_prefix}/etc/openpkg/register.tran \
+        %ghost %{l_prefix}/etc/openpkg/register.prep \
+        %config %{l_prefix}/etc/openpkg/register.conf
+
+%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 start PostgreSQL and"
+          echo "   initialize the OpenPKG Registry database like this:"
+          echo "     # $RPM_INSTALL_PREFIX/etc/rc postgresql start"
+          echo "     \$ $RPM_INSTALL_PREFIX/sbin/openpkg-registry-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/etc/rc apache start"
+          echo "   and connect with a browser to:"
+          echo " http://127.0.0.1:80/openpkg-cgi/openpkg-registry/registry-ui.cgi"
+        ) | %{l_rpmtool} msg -b -t notice
+    fi
+    if [ $1 -eq 2 ]; then
+        #   display final hints on update installation
+        ( echo "Please perform a OpenPKG Registry database upgrade by running"
+          echo "     \$ $RPM_INSTALL_PREFIX/sbin/openpkg-registry-setup"
+        ) | %{l_rpmtool} msg -b -t notice
+    fi
+    exit 0
+%endif
+