cdrstats/cdrstats.spec

changeset 323
3f6d90711444
child 324
d423aaf00721
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cdrstats/cdrstats.spec	Thu Mar 24 20:08:25 2011 +0100
     1.3 @@ -0,0 +1,115 @@
     1.4 +##
     1.5 +##  cdrstats.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_strange1  v1
    1.29 +%define       V_strange2  current
    1.30 +%define       V_strange3  0
    1.31 +%define       V_strange4  g60944b5
    1.32 +%define       V_strange5  591d9bf
    1.33 +%define       V_opkg      g60944b5
    1.34 +
    1.35 +#   package information
    1.36 +Name:         cdrstats
    1.37 +Summary:      Call Data Record viewer
    1.38 +URL:          http://www.cdr-stats.org/
    1.39 +Vendor:       Star2billing S.L.
    1.40 +Packager:     Michael Schloh von Bennewitz
    1.41 +Distribution: Europalab Production
    1.42 +Class:        EVAL
    1.43 +Group:        Monitoring
    1.44 +License:      AGPL
    1.45 +Version:      %{V_opkg}
    1.46 +Release:      20110300
    1.47 +
    1.48 +#   list of sources
    1.49 +Source0:      http://download.github.com/Star2Billing-cdr-stats-v1-current-0-%{version}.tar.gz
    1.50 +Patch0:       cdrstats.patch
    1.51 +
    1.52 +#   build information
    1.53 +Prefix:       %{l_prefix}
    1.54 +BuildRoot:    %{l_buildroot}
    1.55 +BuildPreReq:  OpenPKG, openpkg >= 20060823, python
    1.56 +PreReq:       OpenPKG, openpkg >= 20060823, python
    1.57 +BuildPreReq:  python-django, python-db, python-dateutils, python-uniform
    1.58 +PreReq:       python-django, python-db, python-dateutils, python-uniform
    1.59 +AutoReq:      no
    1.60 +AutoReqProv:  no
    1.61 +
    1.62 +%description
    1.63 +    CDR-Stats is a CDR viewer for PBX Call Data Records. It
    1.64 +    interrogates CDR entries to provide reports and statistics
    1.65 +    via a simple to use yet powerful web interface.
    1.66 +
    1.67 +%track
    1.68 +    prog cdrstats = {
    1.69 +        version   = %{version}
    1.70 +        url       = http://download.github.com/
    1.71 +        regex     = Star2Billing-cdr-stats-v1-current-0-(__VER__)\.tar\.gz
    1.72 +    }
    1.73 +
    1.74 +%prep
    1.75 +    %setup -q -n Star2Billing-cdr-stats-%{V_strange5}
    1.76 +    %patch -p0
    1.77 +    %{l_shtool} subst \
    1.78 +        -e 's;\(LANGUAGE_CODE = .\);\1de-DE;' \
    1.79 +        -e 's;\(SECRET_KEY = .\);\1bniceque-etithfy**un12ot-uninot2299;' \
    1.80 +        -e 's;\(dilla\);#\1;' \
    1.81 +        -e 's;\(south\);#\1;' \
    1.82 +        -e 's;#\(.*gettext\);\1;g' \
    1.83 +        cdr_stats/settings.py
    1.84 +    %{l_shtool} subst \
    1.85 +        -e 's;/admin/\(cdr/report/\);\1;' \
    1.86 +        cdr_stats/templates/admin/index.html
    1.87 +    %{l_shtool} subst \
    1.88 +        -e 's;/\(login/\);\1;' \
    1.89 +        cdr_stats/templates/cdr/login.html
    1.90 +    %{l_shtool} subst \
    1.91 +        -e 's;/\(logout/\);\1;' \
    1.92 +        cdr_stats/templates/cdr/login_option.html
    1.93 +    %{l_shtool} subst \
    1.94 +        -e 's;\.\./\([^/][^/]*/\);\1;g' \
    1.95 +        cdr_stats/templates/cdr/master.html
    1.96 +    %{l_shtool} subst \
    1.97 +        -e 's;/\(export_csv/\);\1;' \
    1.98 +        cdr_stats/templates/cdr/show_jqgrid.html
    1.99 +    %{l_shtool} subst \
   1.100 +        -e 's;\(return HttpResponseRedirect\)(.*;\1(settings.SERVE_ROOT);' \
   1.101 +        cdr_stats/cdr/views.py
   1.102 +    %{l_shtool} subst \
   1.103 +        -e 's;/password/;password/;' \
   1.104 +        cdr_stats/resources/css/blueprint/plugins/buttons/readme.txt
   1.105 +
   1.106 +%build
   1.107 +
   1.108 +%install
   1.109 +    rm -rf $RPM_BUILD_ROOT
   1.110 +    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats
   1.111 +    cp -r cdr_stats $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats/
   1.112 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.113 +
   1.114 +%files -f files
   1.115 +
   1.116 +%clean
   1.117 +    rm -rf $RPM_BUILD_ROOT
   1.118 +

mercurial