Bug 113738 - [new port] www/asterisk-stat
Summary: [new port] www/asterisk-stat
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-16 03:30 UTC by jfkimura
Modified: 2007-07-28 10:30 UTC (History)
1 user (show)

See Also:


Attachments
20070623-www.asterisk-stat.shar (10.17 KB, text/plain)
2007-06-23 07:35 UTC, jfkimura
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jfkimura 2007-06-16 03:30:03 UTC

Fix: === begin  ===


=== ended  ===--gOUceswQDQQxmGkwYMfkMXpOhw1gucWYhNLe0nlVaPQ2eT95
Content-Type: text/plain; name="file.shar"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./asterisk-stat/
#	./asterisk-stat/files
#	./asterisk-stat/files/patch-defines.php
#	./asterisk-stat/files/patch-cdr.php
#	./asterisk-stat/files/patch-export_pdf.php
#	./asterisk-stat/files/cdr_mysql.tbl
#	./asterisk-stat/Makefile
#	./asterisk-stat/distinfo
#	./asterisk-stat/pkg-descr
#
echo c - ./asterisk-stat/
mkdir -p ./asterisk-stat/ > /dev/null 2>&1
echo c - ./asterisk-stat/files
mkdir -p ./asterisk-stat/files > /dev/null 2>&1
echo x - ./asterisk-stat/files/patch-defines.php
sed 's/^X//' >./asterisk-stat/files/patch-defines.php << 'END-of-./asterisk-stat/files/patch-defines.php'
X--- lib/defines.php.orig	Tue Mar  8 04:07:23 2005
X+++ lib/defines.php	Thu Jul 20 21:51:35 2006
X@@ -1,7 +1,7 @@
X <?php
X 
X define ("WEBROOT", "http://domainname.com/asterisk-stat/");
X-define ("FSROOT", "/var/www/html/HTTP2/Asterisk/asterisk-stat-v2/");
X+define ("FSROOT", "/usr/local/www/asterisk-stat/");
X 
X 
X 
X@@ -9,11 +9,11 @@
X 
X 
X define ("HOST", "localhost");
X-define ("PORT", "5432");
X-define ("USER", "postgres");
X+define ("PORT", "3306");
X+define ("USER", "asterisk");
X define ("PASS", "");
X-define ("DBNAME", "cdrasterisk");
X-define ("DB_TYPE", "postgres"); // mysql or postgres
X+define ("DBNAME", "asterisk");
X+define ("DB_TYPE", "mysql"); // mysql or postgres
X 
X 
X define ("DB_TABLENAME", "cdr");
END-of-./asterisk-stat/files/patch-defines.php
echo x - ./asterisk-stat/files/patch-cdr.php
sed 's/^X//' >./asterisk-stat/files/patch-cdr.php << 'END-of-./asterisk-stat/files/patch-cdr.php'
X--- cdr.php.orig	Mon Mar  7 19:20:48 2005
X+++ cdr.php	Thu Jul 20 23:47:46 2006
X@@ -36,7 +36,7 @@
X 	<head>		
X 		<title>Asterisk CDR</title>
X 		<meta http-equiv="Content-Type" content="text/html">
X-		<link rel="stylesheet" type="text/css" media="print" href="/css/print.css">
X+		<link rel="stylesheet" type="text/css" media="print" href="css/print.css">
X 		<SCRIPT LANGUAGE="JavaScript" SRC="./encrypt.js"></SCRIPT>
X 		<style type="text/css" media="screen">
X 			@import url("css/layout.css");
END-of-./asterisk-stat/files/patch-cdr.php
echo x - ./asterisk-stat/files/patch-export_pdf.php
sed 's/^X//' >./asterisk-stat/files/patch-export_pdf.php << 'END-of-./asterisk-stat/files/patch-export_pdf.php'
X--- export_pdf.php.orig	Thu Mar  3 00:11:32 2005
X+++ export_pdf.php	Thu Jul 20 23:50:45 2006
X@@ -2,7 +2,7 @@
X include_once(dirname(__FILE__) . "/lib/defines.php");
X include_once(dirname(__FILE__) . "/lib/Class.Table.php");
X define(FPDF_FONTPATH,dirname(__FILE__).'/lib/font/');
X-include_once(dirname(__FILE__) . "/lib/fpdf.php');
X+include_once(dirname(__FILE__) . "/lib/fpdf.php");
X 
X session_start();
X 
END-of-./asterisk-stat/files/patch-export_pdf.php
echo x - ./asterisk-stat/files/cdr_mysql.tbl
sed 's/^X//' >./asterisk-stat/files/cdr_mysql.tbl << 'END-of-./asterisk-stat/files/cdr_mysql.tbl'
XUSE asterisk;
X
XCREATE TABLE cdr (
X  calldate datetime NOT NULL default '0000-00-00 00:00:00',
X  clid varchar(80) NOT NULL default '',
X  src varchar(80) NOT NULL default '',
X  dst varchar(80) NOT NULL default '',
X  dcontext varchar(80) NOT NULL default '',
X  channel varchar(80) NOT NULL default '',
X  dstchannel varchar(80) NOT NULL default '',
X  lastapp varchar(80) NOT NULL default '',
X  lastdata varchar(80) NOT NULL default '',
X  duration int(11) NOT NULL default '0',
X  billsec int(11) NOT NULL default '0',
X  disposition varchar(45) NOT NULL default '',
X  amaflags int(11) NOT NULL default '0',
X  accountcode varchar(20) NOT NULL default '',
X  uniqueid varchar(32) NOT NULL default '',
X  userfield varchar(255) NOT NULL default ''
X);
X
XALTER TABLE `cdr` ADD INDEX ( `calldate` );
XALTER TABLE `cdr` ADD INDEX ( `dst` );
XALTER TABLE `cdr` ADD INDEX ( `accountcode` );
END-of-./asterisk-stat/files/cdr_mysql.tbl
echo x - ./asterisk-stat/Makefile
sed 's/^X//' >./asterisk-stat/Makefile << 'END-of-./asterisk-stat/Makefile'
X# New ports collection makefile for:	www/asterisk-stat
X# Date created:				16 June 2007
X# Whom:	      				Fumihiko Kimura <jfkimura@yahoo.co.jp>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	asterisk-stat
XPORTVERSION=	2.0.1
X#PORTREVISION=	0
XCATEGORIES=	www
XMASTER_SITES=	http://www.areski.net/${SITE_SUBDIR}/
XDISTNAME=	${PORTNAME}-v${PORTVERSION:S/./_/g}
X
XMAINTAINER=	jfkimura@yahoo.co.jp
XCOMMENT=	ASTERISK Call Detail Records Analizer
X
XRUN_DEPENDS=	${LOCALBASE}/lib/asterisk/modules/cdr_addon_mysql.so:${PORTSDIR}/net/asterisk-addons
XLIB_DEPENDS=	gd.4:${PORTSDIR}/graphics/gd
X
XNO_BUILD=	yes
XUSE_PHP=	mysql session gd
X#USE_APACHE=	20+
XUSE_APACHE=	yes
XWANT_PHP_WEB=	yes
XASTERISKDIR?=	www/asterisk-stat
XSITE_SUBDIR=	asterisk-stat-v2
XWRKSRC=		${WRKDIR}/${SITE_SUBDIR}
X
X#OPTIONS=	PGSQL "Use PostgreSQL instead of MySQL (not funtional)" off
X
X.include <bsd.port.pre.mk>
X
Xpost-patch:
X	@${MV} ${WRKSRC}/images/print.css ${WRKSRC}/css
X	@${CP} ${WRKSRC}/images/spacer.gif ${WRKSRC}/images/clear.gif
X	@${CP} ${WRKSRC}/css/images/*png ${WRKSRC}/images
X	@${RM} ${WRKSRC}/about.php \
X		${WRKSRC}/lib/defines.php.orig \
X		${WRKSRC}/cdr.php.orig \
X		${WRKSRC}/export_pdf.php.orig
X
Xdo-install:
X	@${MKDIR} ${PREFIX}/${ASTERISKDIR}
X	@${MV} ${WRKSRC}/lib/defines.php ${WRKSRC}/lib/defines.php-dist
X	${CP} -r ${WRKSRC}/ ${PREFIX}/${ASTERISKDIR}
X	${CP} ${FILESDIR}/cdr_mysql.tbl ${PREFIX}/etc/asterisk
X	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${ASTERISKDIR}
X
Xpost-install:
X	@${FIND} ${WRKSRC}/${file} -not -type d \
X		| ${SED} -ne 's,^${WRKSRC},${ASTERISKDIR},p' >> ${TMPPLIST}
X	@${FIND} -d ${WRKSRC}/${file} -type d \
X		| ${SED} -ne 's,^${WRKSRC},@dirrm ${ASTERISKDIR},p' >> ${TMPPLIST}
X	@${ECHO} etc/asterisk/cdr_mysql.tbl >> ${TMPPLIST}
X
X.include <bsd.port.post.mk>
END-of-./asterisk-stat/Makefile
echo x - ./asterisk-stat/distinfo
sed 's/^X//' >./asterisk-stat/distinfo << 'END-of-./asterisk-stat/distinfo'
XMD5 (asterisk-stat-v2_0_1.tar.gz) = aad3fe2f9826e8d63dfc9bdea2315d4a
XSHA256 (asterisk-stat-v2_0_1.tar.gz) = a7c17742a4b84b2a90f278009a538d25a8c493a4333d9dd13cdd47ed308a19af
XSIZE (asterisk-stat-v2_0_1.tar.gz) = 390475
END-of-./asterisk-stat/distinfo
echo x - ./asterisk-stat/pkg-descr
sed 's/^X//' >./asterisk-stat/pkg-descr << 'END-of-./asterisk-stat/pkg-descr'
XAsterisk-Stat is providing different reports & Graph to allow 
Xthe Asterisk-admin to analyse quickly
Xand easily the traffic on their Asterisk server.
XAll the graphic & reports are based over the CDR database. 
X
XWWW: http://www.areski.net/asterisk-stat-v2/about.php
END-of-./asterisk-stat/pkg-descr
exit
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-06-16 07:43:57 UTC
State Changed
From-To: open->repocopy

over to portmgr for a repocopy 


Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2007-06-16 07:43:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->Portmgr

over to portmgr for a repocopy
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2007-06-16 07:43:57 UTC
State Changed
From-To: open->open

Fix synopsis 



Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2007-06-16 07:43:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-ports-bugs

Fix synopsis
Comment 5 jfkimura 2007-06-23 07:35:42 UTC
> http://www.freebsd.org/cgi/query-pr.cgi?pr=113738

I changed it to work in MySQL and PostgreSQL. I confirm movement in
Asterisk 1.4.4. I tested it only in FreeBSD 6.2-RELEASE.

(I forgot the transmission of a message to bug-followup)



Comment 6 Li-Wen Hsu freebsd_committer freebsd_triage 2007-07-13 06:47:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lwhsu

I'll take it.
Comment 7 Li-Wen Hsu freebsd_committer freebsd_triage 2007-07-22 16:11:41 UTC
State Changed
From-To: open->feedback

Ask for submitter approval about some fixes.
Comment 8 dfilter service freebsd_committer freebsd_triage 2007-07-28 10:21:21 UTC
lwhsu       2007-07-28 09:21:15 UTC

  FreeBSD ports repository

  Modified files:
    www                  Makefile 
  Added files:
    www/asterisk-stat    Makefile distinfo pkg-descr 
    www/asterisk-stat/files cdr_mysql.tbl cdr_pgsql.tbl 
                            mysql__patch-cdr.php 
                            mysql__patch-defines.php 
                            patch-export_pdf.php 
                            pgsql__patch-cdr.php 
                            pgsql__patch-defines.php 
                            pkg-message.in 
  Log:
  Add asterisk-stat 2.0.1, ASTERISK Call Detail Records Analizer.
  
  PR:             ports/113738
  Submitted by:   Fumihiko Kimura <jfkimura at yahoo.com>
  
  Revision  Changes    Path
  1.1866    +1 -0      ports/www/Makefile
  1.1       +73 -0     ports/www/asterisk-stat/Makefile (new)
  1.1       +3 -0      ports/www/asterisk-stat/distinfo (new)
  1.1       +24 -0     ports/www/asterisk-stat/files/cdr_mysql.tbl (new)
  1.1       +23 -0     ports/www/asterisk-stat/files/cdr_pgsql.tbl (new)
  1.1       +11 -0     ports/www/asterisk-stat/files/mysql__patch-cdr.php (new)
  1.1       +27 -0     ports/www/asterisk-stat/files/mysql__patch-defines.php (new)
  1.1       +11 -0     ports/www/asterisk-stat/files/patch-export_pdf.php (new)
  1.1       +11 -0     ports/www/asterisk-stat/files/pgsql__patch-cdr.php (new)
  1.1       +23 -0     ports/www/asterisk-stat/files/pgsql__patch-defines.php (new)
  1.1       +5 -0      ports/www/asterisk-stat/files/pkg-message.in (new)
  1.1       +6 -0      ports/www/asterisk-stat/pkg-descr (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Li-Wen Hsu freebsd_committer freebsd_triage 2007-07-28 10:23:09 UTC
State Changed
From-To: feedback->closed

New port added. Thanks!