Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@323 | 1 | ## |
michael@323 | 2 | ## cdrstats.spec -- OpenPKG RPM Package Specification |
michael@323 | 3 | ## Copyright (c) 2011 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@323 | 4 | ## |
michael@323 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@323 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@323 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@323 | 8 | ## copies. |
michael@323 | 9 | ## |
michael@323 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@323 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@323 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@323 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@323 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@323 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@323 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@323 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@323 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@323 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@323 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@323 | 21 | ## SUCH DAMAGE. |
michael@323 | 22 | ## |
michael@323 | 23 | |
michael@323 | 24 | # package version |
michael@323 | 25 | %define V_strange1 v1 |
michael@323 | 26 | %define V_strange2 current |
michael@323 | 27 | %define V_strange3 0 |
michael@323 | 28 | %define V_strange4 g60944b5 |
michael@323 | 29 | %define V_strange5 591d9bf |
michael@323 | 30 | %define V_opkg g60944b5 |
michael@323 | 31 | |
michael@323 | 32 | # package information |
michael@323 | 33 | Name: cdrstats |
michael@323 | 34 | Summary: Call Data Record viewer |
michael@323 | 35 | URL: http://www.cdr-stats.org/ |
michael@323 | 36 | Vendor: Star2billing S.L. |
michael@323 | 37 | Packager: Michael Schloh von Bennewitz |
michael@323 | 38 | Distribution: Europalab Production |
michael@323 | 39 | Class: EVAL |
michael@323 | 40 | Group: Monitoring |
michael@323 | 41 | License: AGPL |
michael@323 | 42 | Version: %{V_opkg} |
michael@323 | 43 | Release: 20110300 |
michael@323 | 44 | |
michael@323 | 45 | # list of sources |
michael@324 | 46 | Source0: http://download.github.com/Star2Billing-cdr-stats-%{V_strange1}-%{V_strange2}-%{V_strange3}-%{version}.tar.gz |
michael@323 | 47 | Patch0: cdrstats.patch |
michael@323 | 48 | |
michael@323 | 49 | # build information |
michael@323 | 50 | Prefix: %{l_prefix} |
michael@323 | 51 | BuildRoot: %{l_buildroot} |
michael@323 | 52 | BuildPreReq: OpenPKG, openpkg >= 20060823, python |
michael@323 | 53 | PreReq: OpenPKG, openpkg >= 20060823, python |
michael@323 | 54 | BuildPreReq: python-django, python-db, python-dateutils, python-uniform |
michael@323 | 55 | PreReq: python-django, python-db, python-dateutils, python-uniform |
michael@323 | 56 | AutoReq: no |
michael@323 | 57 | AutoReqProv: no |
michael@323 | 58 | |
michael@323 | 59 | %description |
michael@323 | 60 | CDR-Stats is a CDR viewer for PBX Call Data Records. It |
michael@323 | 61 | interrogates CDR entries to provide reports and statistics |
michael@323 | 62 | via a simple to use yet powerful web interface. |
michael@323 | 63 | |
michael@323 | 64 | %track |
michael@323 | 65 | prog cdrstats = { |
michael@323 | 66 | version = %{version} |
michael@323 | 67 | url = http://download.github.com/ |
michael@324 | 68 | regex = Star2Billing-cdr-stats-%{V_strange1}-%{V_strange2}-%{V_strange3}-(__VER__)\.tar\.gz |
michael@323 | 69 | } |
michael@323 | 70 | |
michael@323 | 71 | %prep |
michael@323 | 72 | %setup -q -n Star2Billing-cdr-stats-%{V_strange5} |
michael@323 | 73 | %patch -p0 |
michael@323 | 74 | %{l_shtool} subst \ |
michael@323 | 75 | -e 's;\(LANGUAGE_CODE = .\);\1de-DE;' \ |
michael@323 | 76 | -e 's;\(SECRET_KEY = .\);\1bniceque-etithfy**un12ot-uninot2299;' \ |
michael@323 | 77 | -e 's;\(dilla\);#\1;' \ |
michael@323 | 78 | -e 's;\(south\);#\1;' \ |
michael@323 | 79 | -e 's;#\(.*gettext\);\1;g' \ |
michael@323 | 80 | cdr_stats/settings.py |
michael@323 | 81 | %{l_shtool} subst \ |
michael@323 | 82 | -e 's;/admin/\(cdr/report/\);\1;' \ |
michael@323 | 83 | cdr_stats/templates/admin/index.html |
michael@323 | 84 | %{l_shtool} subst \ |
michael@323 | 85 | -e 's;/\(login/\);\1;' \ |
michael@323 | 86 | cdr_stats/templates/cdr/login.html |
michael@323 | 87 | %{l_shtool} subst \ |
michael@323 | 88 | -e 's;/\(logout/\);\1;' \ |
michael@323 | 89 | cdr_stats/templates/cdr/login_option.html |
michael@323 | 90 | %{l_shtool} subst \ |
michael@323 | 91 | -e 's;\.\./\([^/][^/]*/\);\1;g' \ |
michael@323 | 92 | cdr_stats/templates/cdr/master.html |
michael@323 | 93 | %{l_shtool} subst \ |
michael@323 | 94 | -e 's;/\(export_csv/\);\1;' \ |
michael@323 | 95 | cdr_stats/templates/cdr/show_jqgrid.html |
michael@323 | 96 | %{l_shtool} subst \ |
michael@323 | 97 | -e 's;\(return HttpResponseRedirect\)(.*;\1(settings.SERVE_ROOT);' \ |
michael@323 | 98 | cdr_stats/cdr/views.py |
michael@323 | 99 | %{l_shtool} subst \ |
michael@323 | 100 | -e 's;/password/;password/;' \ |
michael@323 | 101 | cdr_stats/resources/css/blueprint/plugins/buttons/readme.txt |
michael@323 | 102 | |
michael@323 | 103 | %build |
michael@323 | 104 | |
michael@323 | 105 | %install |
michael@323 | 106 | rm -rf $RPM_BUILD_ROOT |
michael@323 | 107 | %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats |
michael@323 | 108 | cp -r cdr_stats $RPM_BUILD_ROOT%{l_prefix}/libexec/cdrstats/ |
michael@323 | 109 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@323 | 110 | |
michael@323 | 111 | %files -f files |
michael@323 | 112 | |
michael@323 | 113 | %clean |
michael@323 | 114 | rm -rf $RPM_BUILD_ROOT |
michael@323 | 115 |