# HG changeset patch # User Michael Schloh von Bennewitz # Date 1300993705 -3600 # Node ID 3f6d90711444abe6097a35dfccc8908b91223562 # Parent 30c214982bd235c1ac9e186495635eba1a2019ef Import new package spec for introduction into repository. diff -r 30c214982bd2 -r 3f6d90711444 cdrstats/cdrstats.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cdrstats/cdrstats.patch Thu Mar 24 20:08:25 2011 +0100 @@ -0,0 +1,19 @@ +Index: cdr_stats/settings.py +--- cdr_stats/settings.py.orig 2010-11-23 20:49:13.000000000 +0100 ++++ cdr_stats/settings.py 2011-03-24 19:48:52.368398330 +0100 +@@ -55,6 +55,7 @@ + # calendars according to the current locale + USE_L10N = True + ++SERVE_ROOT = 'https://tls.europalab.com/cdr/' + MEDIA_ROOT = os.path.join( APPLICATION_DIR, 'resources' ) + MEDIA_URL = 'http://localhost:8000/resources/' + ADMIN_MEDIA_PREFIX = '/resources/admin/' +Index: cdr_stats/cdr/views.py +--- cdr_stats/cdr/views.py.orig 2010-11-23 20:49:13.000000000 +0100 ++++ cdr_stats/cdr/views.py 2011-03-23 23:47:35.524666932 +0100 +@@ -1,3 +1,4 @@ ++from django.conf import settings + from django.contrib.auth.models import User + from django.contrib.auth import authenticate, login, logout + from django.contrib.auth.decorators import login_required diff -r 30c214982bd2 -r 3f6d90711444 cdrstats/cdrstats.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cdrstats/cdrstats.spec Thu Mar 24 20:08:25 2011 +0100 @@ -0,0 +1,115 @@ +## +## cdrstats.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2011 Michael Schloh von Bennewitz +## +## 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_strange1 v1 +%define V_strange2 current +%define V_strange3 0 +%define V_strange4 g60944b5 +%define V_strange5 591d9bf +%define V_opkg g60944b5 + +# package information +Name: cdrstats +Summary: Call Data Record viewer +URL: http://www.cdr-stats.org/ +Vendor: Star2billing S.L. +Packager: Michael Schloh von Bennewitz +Distribution: Europalab Production +Class: EVAL +Group: Monitoring +License: AGPL +Version: %{V_opkg} +Release: 20110300 + +# list of sources +Source0: http://download.github.com/Star2Billing-cdr-stats-v1-current-0-%{version}.tar.gz +Patch0: cdrstats.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823, python +PreReq: OpenPKG, openpkg >= 20060823, python +BuildPreReq: python-django, python-db, python-dateutils, python-uniform +PreReq: python-django, python-db, python-dateutils, python-uniform +AutoReq: no +AutoReqProv: no + +%description + CDR-Stats is a CDR viewer for PBX Call Data Records. It + interrogates CDR entries to provide reports and statistics + via a simple to use yet powerful web interface. + +%track + prog cdrstats = { + version = %{version} + url = http://download.github.com/ + regex = Star2Billing-cdr-stats-v1-current-0-(__VER__)\.tar\.gz + } + +%prep + %setup -q -n Star2Billing-cdr-stats-%{V_strange5} + %patch -p0 + %{l_shtool} subst \ + -e 's;\(LANGUAGE_CODE = .\);\1de-DE;' \ + -e 's;\(SECRET_KEY = .\);\1bniceque-etithfy**un12ot-uninot2299;' \ + -e 's;\(dilla\);#\1;' \ + -e 's;\(south\);#\1;' \ + -e 's;#\(.*gettext\);\1;g' \ + cdr_stats/settings.py + %{l_shtool} subst \ + -e 's;/admin/\(cdr/report/\);\1;' \ + cdr_stats/templates/admin/index.html + %{l_shtool} subst \ + -e 's;/\(login/\);\1;' \ + cdr_stats/templates/cdr/login.html + %{l_shtool} subst \ + -e 's;/\(logout/\);\1;' \ + cdr_stats/templates/cdr/login_option.html + %{l_shtool} subst \ + -e 's;\.\./\([^/][^/]*/\);\1;g' \ + cdr_stats/templates/cdr/master.html + %{l_shtool} subst \ + -e 's;/\(export_csv/\);\1;' \ + cdr_stats/templates/cdr/show_jqgrid.html + %{l_shtool} subst \ + -e 's;\(return HttpResponseRedirect\)(.*;\1(settings.SERVE_ROOT);' \ + cdr_stats/cdr/views.py + %{l_shtool} subst \ + -e 's;/password/;password/;' \ + cdr_stats/resources/css/blueprint/plugins/buttons/readme.txt + +%build + +%install + rm -rf $RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats + cp -r cdr_stats $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT +