Import new package spec for introduction into repository.

Thu, 24 Mar 2011 20:08:25 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 24 Mar 2011 20:08:25 +0100
changeset 323
3f6d90711444
parent 322
30c214982bd2
child 324
d423aaf00721

Import new package spec for introduction into repository.

cdrstats/cdrstats.patch file | annotate | diff | comparison | revisions
cdrstats/cdrstats.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cdrstats/cdrstats.patch	Thu Mar 24 20:08:25 2011 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +Index: cdr_stats/settings.py
     1.5 +--- cdr_stats/settings.py.orig	2010-11-23 20:49:13.000000000 +0100
     1.6 ++++ cdr_stats/settings.py	2011-03-24 19:48:52.368398330 +0100
     1.7 +@@ -55,6 +55,7 @@
     1.8 + # calendars according to the current locale
     1.9 + USE_L10N = True
    1.10 + 
    1.11 ++SERVE_ROOT = 'https://tls.europalab.com/cdr/'
    1.12 + MEDIA_ROOT = os.path.join( APPLICATION_DIR, 'resources' )
    1.13 + MEDIA_URL = 'http://localhost:8000/resources/'
    1.14 + ADMIN_MEDIA_PREFIX = '/resources/admin/'
    1.15 +Index: cdr_stats/cdr/views.py
    1.16 +--- cdr_stats/cdr/views.py.orig	2010-11-23 20:49:13.000000000 +0100
    1.17 ++++ cdr_stats/cdr/views.py	2011-03-23 23:47:35.524666932 +0100
    1.18 +@@ -1,3 +1,4 @@
    1.19 ++from django.conf import settings
    1.20 + from django.contrib.auth.models import User
    1.21 + from django.contrib.auth import authenticate, login, logout
    1.22 + from django.contrib.auth.decorators import login_required
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/cdrstats/cdrstats.spec	Thu Mar 24 20:08:25 2011 +0100
     2.3 @@ -0,0 +1,115 @@
     2.4 +##
     2.5 +##  cdrstats.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package version
    2.28 +%define       V_strange1  v1
    2.29 +%define       V_strange2  current
    2.30 +%define       V_strange3  0
    2.31 +%define       V_strange4  g60944b5
    2.32 +%define       V_strange5  591d9bf
    2.33 +%define       V_opkg      g60944b5
    2.34 +
    2.35 +#   package information
    2.36 +Name:         cdrstats
    2.37 +Summary:      Call Data Record viewer
    2.38 +URL:          http://www.cdr-stats.org/
    2.39 +Vendor:       Star2billing S.L.
    2.40 +Packager:     Michael Schloh von Bennewitz
    2.41 +Distribution: Europalab Production
    2.42 +Class:        EVAL
    2.43 +Group:        Monitoring
    2.44 +License:      AGPL
    2.45 +Version:      %{V_opkg}
    2.46 +Release:      20110300
    2.47 +
    2.48 +#   list of sources
    2.49 +Source0:      http://download.github.com/Star2Billing-cdr-stats-v1-current-0-%{version}.tar.gz
    2.50 +Patch0:       cdrstats.patch
    2.51 +
    2.52 +#   build information
    2.53 +Prefix:       %{l_prefix}
    2.54 +BuildRoot:    %{l_buildroot}
    2.55 +BuildPreReq:  OpenPKG, openpkg >= 20060823, python
    2.56 +PreReq:       OpenPKG, openpkg >= 20060823, python
    2.57 +BuildPreReq:  python-django, python-db, python-dateutils, python-uniform
    2.58 +PreReq:       python-django, python-db, python-dateutils, python-uniform
    2.59 +AutoReq:      no
    2.60 +AutoReqProv:  no
    2.61 +
    2.62 +%description
    2.63 +    CDR-Stats is a CDR viewer for PBX Call Data Records. It
    2.64 +    interrogates CDR entries to provide reports and statistics
    2.65 +    via a simple to use yet powerful web interface.
    2.66 +
    2.67 +%track
    2.68 +    prog cdrstats = {
    2.69 +        version   = %{version}
    2.70 +        url       = http://download.github.com/
    2.71 +        regex     = Star2Billing-cdr-stats-v1-current-0-(__VER__)\.tar\.gz
    2.72 +    }
    2.73 +
    2.74 +%prep
    2.75 +    %setup -q -n Star2Billing-cdr-stats-%{V_strange5}
    2.76 +    %patch -p0
    2.77 +    %{l_shtool} subst \
    2.78 +        -e 's;\(LANGUAGE_CODE = .\);\1de-DE;' \
    2.79 +        -e 's;\(SECRET_KEY = .\);\1bniceque-etithfy**un12ot-uninot2299;' \
    2.80 +        -e 's;\(dilla\);#\1;' \
    2.81 +        -e 's;\(south\);#\1;' \
    2.82 +        -e 's;#\(.*gettext\);\1;g' \
    2.83 +        cdr_stats/settings.py
    2.84 +    %{l_shtool} subst \
    2.85 +        -e 's;/admin/\(cdr/report/\);\1;' \
    2.86 +        cdr_stats/templates/admin/index.html
    2.87 +    %{l_shtool} subst \
    2.88 +        -e 's;/\(login/\);\1;' \
    2.89 +        cdr_stats/templates/cdr/login.html
    2.90 +    %{l_shtool} subst \
    2.91 +        -e 's;/\(logout/\);\1;' \
    2.92 +        cdr_stats/templates/cdr/login_option.html
    2.93 +    %{l_shtool} subst \
    2.94 +        -e 's;\.\./\([^/][^/]*/\);\1;g' \
    2.95 +        cdr_stats/templates/cdr/master.html
    2.96 +    %{l_shtool} subst \
    2.97 +        -e 's;/\(export_csv/\);\1;' \
    2.98 +        cdr_stats/templates/cdr/show_jqgrid.html
    2.99 +    %{l_shtool} subst \
   2.100 +        -e 's;\(return HttpResponseRedirect\)(.*;\1(settings.SERVE_ROOT);' \
   2.101 +        cdr_stats/cdr/views.py
   2.102 +    %{l_shtool} subst \
   2.103 +        -e 's;/password/;password/;' \
   2.104 +        cdr_stats/resources/css/blueprint/plugins/buttons/readme.txt
   2.105 +
   2.106 +%build
   2.107 +
   2.108 +%install
   2.109 +    rm -rf $RPM_BUILD_ROOT
   2.110 +    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats
   2.111 +    cp -r cdr_stats $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats/
   2.112 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.113 +
   2.114 +%files -f files
   2.115 +
   2.116 +%clean
   2.117 +    rm -rf $RPM_BUILD_ROOT
   2.118 +

mercurial