[ATrpms-users] MYSQLUNIQUEID support on compilation time in asterisk-addons packages
Luís Palma
lpalma at gmail.com
Tue Sep 18 22:28:16 CEST 2007
Because this message has been bounced for approval i made myself member to
this list and re-post it again:
Hi,
Due to my noobiness regarding rpm packaging I'm asking for someone to
provide me some hints in how do I enable CDR MYSQLUNIQUEID in
asterisk_addons.specs file.
I've been fiddling with the src.rpm with success. The changes at compile
time are minimal just to enable on mere flag on two files (cdr_addon_mysql.c
and the Makefile itself). At the end I send the diff files.
I read somewhere that this change could be done in cdr.conf without
recompiling asterisk-addons (which I have done without success).
For more info see http://www.voip-info.org/wiki-Asterisk+cdr+mysql ("Storing
the UNIQUE ID" section).
Second approach is if someone can se what am I doing wrong on the perl on
liners that I want to add to my customized asterisk-addon.specs
# enable MYSQL LOGUNIQUEUID usage on cdrs
# perl -pi -e's,^/\* \#define MYSQL_LOGUNIQUEID \*/,#define
MYSQL_LOGUNIQUEID,g' cdr_addon_mysql.c
# perl -pi -e's,^/\*CFLAGS+=,CFLAGS=-DMYSQL_LOGUNIQUEID,g,' Makefile
src.rpm version I'm working with is : asterisk-addons-1.4.2-16.src.rpm
Thanks in advance
Luis Palma
Update from repost: Looks like in the actual trunk version from
asterisk-addons this is already a runtime option, but since I don't know
when there it will be a new release I would also like to build my
personalized rpm with this enabled. Can anyone help me?
--- cdr_addon_mysql.c 2007-06-18 23:40:40.000000000 +0100
+++ cdr_addon_mysql_uniqueid.c 2007-09-16 17:15:10.000000000 +0100
@@ -48,6 +48,8 @@
#define DATE_FORMAT "%Y-%m-%d %T"
+#define MYSQL_LOGUNIQUEID
+
static char *desc = "MySQL CDR Backend";
static char *name = "mysql";
static char *config = "cdr_mysql.conf";
--- Makefile 2007-06-05 23:05:09.000000000 +0100
+++ Makefileuniqueid 2007-09-16 17:15:58.000000000 +0100
@@ -18,6 +18,8 @@
CFLAGS+=-fPIC
+CFLAGS+=-DMYSQL_LOGUNIQUEID
+
# If the file .asteriskaddons.makeopts is present in your home directory,
you can
# include all of your favorite menuselect options so that every time you
download
# a new version of Asterisk-addons, you don't have to run menuselect to set
them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.atrpms.net/pipermail/atrpms-users/attachments/20070918/f96bb6cb/attachment.html
More information about the atrpms-users
mailing list