- update to 0.40

- fix HOMEPAGE/MASTER_SITES
- fix WANTLIB in mysql
- regen patches
- make escaping more pgsql friendly
- fixes to pgsql upsteam - no longer alpha
- run pkg/DESCR through fmt(1)
- use httpd(8) modules.sample for @sample

feedback and ok merdely@
This commit is contained in:
okan 2008-01-30 20:41:41 +00:00
parent 5e84793fd4
commit 1686e32d55
9 changed files with 42 additions and 78 deletions

View File

@ -1,14 +1,12 @@
# $OpenBSD: Makefile,v 1.12 2007/09/15 23:36:43 merdely Exp $
# $OpenBSD: Makefile,v 1.13 2008/01/30 20:41:41 okan Exp $
COMMENT= turns Apache into an MP3 or Ogg streaming server
DISTNAME= mod_mp3-0.39
PKGNAME= ${DISTNAME}p3
DISTNAME= mod_mp3-0.40
CATEGORIES= www audio
MASTER_SITES= http://download.tangent.org/ \
ftp://ftp.tangent.org/pub/apache/
HOMEPAGE= http://tangent.org/
MASTER_SITES= http://download.tangent.org/
MODULES+= apache-module
@ -39,16 +37,16 @@ ERRORS+= "Fatal: mutually exclusive flavors: ${FLAVORS}"
.if ${FLAVOR:L:Mmysql}
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
CONFIGURE_ARGS+= --with-mysql="${LOCALBASE}"
CONF= ${EXAMPLESRC}/mp3_with_mysql.conf
CONFIGURE_ARGS+=--with-mysql="${LOCALBASE}/bin"
CONF= ${EXAMPLESRC}/mp3_with_mysql.conf
EXAMPLES+= ${EXAMPLESRC}/mysql_schema
WANTLIB= m
WANTLIB+= crypto m ssl z
.endif
.if ${FLAVOR:L:Mpostgresql}
LIB_DEPENDS+= pq.>=2::databases/postgresql
CONFIGURE_ARGS+= --with-postgres="${LOCALBASE}"
CONF= ${FILESDIR}/mp3_with_postgresql.conf
CONFIGURE_ARGS+=--with-postgres="${LOCALBASE}"
CONF= ${FILESDIR}/mp3_with_postgresql.conf
EXAMPLES+= ${EXAMPLESRC}/pgsql_schema
.endif

View File

@ -1,5 +1,5 @@
MD5 (mod_mp3-0.39.tar.gz) = NX8Ne407X07BuvUNr7C/JA==
RMD160 (mod_mp3-0.39.tar.gz) = +M4IMySN21rIA5b47ozI6GNv8+A=
SHA1 (mod_mp3-0.39.tar.gz) = jI3QG8b1vbFYo3VVegn9/+tVJ80=
SHA256 (mod_mp3-0.39.tar.gz) = MWYOOdTMdjC7D77e9RN7xLy62xqtQSQbHsnBphUhfWY=
SIZE (mod_mp3-0.39.tar.gz) = 55047
MD5 (mod_mp3-0.40.tar.gz) = o2sl7k2yaN9FoDIxmT5xjQ==
RMD160 (mod_mp3-0.40.tar.gz) = P8k9ymTRh4c8encHSBQy2RclIKg=
SHA1 (mod_mp3-0.40.tar.gz) = ycN3mf0lvO9Pj+GgGcZWJ+5HKiU=
SHA256 (mod_mp3-0.40.tar.gz) = EDonkJDkTlTf77OU9xEyG+KgE67K5aUI9T/tl8PVzPw=
SIZE (mod_mp3-0.40.tar.gz) = 55064

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-configure,v 1.2 2004/06/13 03:25:17 pvalchev Exp $
--- configure.orig 2002-09-19 00:13:21.000000000 -0600
+++ configure 2004-06-12 21:24:18.000000000 -0600
$OpenBSD: patch-configure,v 1.3 2008/01/30 20:41:41 okan Exp $
--- configure.orig Fri Jan 25 18:00:17 2008
+++ configure Fri Jan 25 18:04:47 2008
@@ -198,15 +198,17 @@ sub with_pgsql {
print "checking for pgsql... ";
@ -23,22 +23,7 @@ $OpenBSD: patch-configure,v 1.2 2004/06/13 03:25:17 pvalchev Exp $
$LIB .= " -L$value/lib/ -lpq ";
$DEF .= " -DPGSQL_ENABLED ";
print "found\n";
@@ -267,11 +269,13 @@ sub with_mysql {
print "checking for mysql... ";
if ($value) {
+ my $libmy = "$value/lib/libmysqlclient.so";
+
if (! -e "$value/include/mysql/mysql.h") {
print "Error! $value/include/mysql/mysql.h not found\n";
exit 1;
}
- if (! -e "$value/lib/libmysqlclient.so") {
+ if (! grep /^$libmy(\.\d+){0,3}/, <$libmy.*>) {
print "Error! $value/lib/libmysqlclient.so not found\n";
exit 1;
}
@@ -567,7 +571,7 @@ PREOP = @$(NOOP)
@@ -511,7 +513,7 @@ PREOP = @$(NOOP)
POSTOP = @$(NOOP)
TO_UNIX = @$(NOOP)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_directives_h,v 1.1.1.1 2003/05/20 01:57:18 naddy Exp $
--- src/directives.h.orig Sun Mar 31 23:45:11 2002
+++ src/directives.h Mon May 19 19:02:07 2003
@@ -23,7 +23,7 @@
#define MP3MySQLInfo "This takes the db name and the table name."
#define MP3MySQLTokenTable "This takes the table name used for tokens."
#endif
-#ifdef PG_ENABLED
+#ifdef PGSQL_ENABLED
#define MP3PgConnectInfo "Host, user and password for connecting to database (defaults to localhost, null, and null)."
#define MP3PgInfo "This takes the db name and the table name."
#define MP3PgTokenTable "This takes the table name used for tokens."

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_mod_mp3_c,v 1.1.1.1 2003/05/20 01:57:18 naddy Exp $
--- src/mod_mp3.c.orig Sun May 19 18:45:56 2002
+++ src/mod_mp3.c Mon May 19 19:02:07 2003
@@ -951,9 +951,9 @@ static const command_rec mp3_module_cmds
{"MP3MySQLTokenTable", mysql_add_token_table, NULL, OR_ALL, TAKE1, MP3MySQLTokenTable},
#endif
#ifdef PGSQL_ENABLED
- {"MP3PgConnectInfo", pgsql_add_connect_info, NULL, OR_ALL, TAKE3, MP3MySQLConnectInfo},
- {"MP3PgInfo", pgsql_add_database_info, NULL, OR_ALL, TAKE2, MP3MySQLInfo},
- {"MP3PgTokenTable", pgsql_add_token_table, NULL, OR_ALL, TAKE1, MP3MySQLTokenTable},
+ {"MP3PgConnectInfo", pgsql_add_connect_info, NULL, OR_ALL, TAKE3, MP3PgConnectInfo},
+ {"MP3PgInfo", pgsql_add_database_info, NULL, OR_ALL, TAKE2, MP3PgInfo},
+ {"MP3PgTokenTable", pgsql_add_token_table, NULL, OR_ALL, TAKE1, MP3PgTokenTable},
#endif
{NULL}
};

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_pgsql_dispatch_h,v 1.1 2008/01/30 20:41:41 okan Exp $
--- src/pgsql_dispatch.h.orig Sat Jan 26 20:51:42 2008
+++ src/pgsql_dispatch.h Sat Jan 26 20:53:07 2008
@@ -4,7 +4,7 @@
#define PG_MP3_GET "SELECT name,filename,signature,artist,album,comment,track,year,genre FROM %s WHERE signature = '%s'"
#define PG_MP3_GET_RANDOM "SELECT name,filename,signature,artist,album,comment,track,year,genre FROM %s ORDER BY round(random()*1000) LIMIT 1"
-#define PG_MP3_INSERT "INSERT INTO %s (name,filename,signature,artist,album,comment,track,year,genre) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')"
+#define PG_MP3_INSERT "INSERT INTO %s (name,filename,signature,artist,album,comment,track,year,genre) VALUES (E'%s',E'%s',E'%s',E'%s',E'%s',E'%s',E'%s',E'%s',E'%s')"
#define PG_MP3_GETS "SELECT name,filename,signature,artist,album,comment,track,year,genre FROM %s"
#define PG_MP3_GET_LIST "SELECT name,filename,signature,artist,album,comment,track,year,genre FROM %s WHERE signature IN (%s)"

View File

@ -1,8 +1,8 @@
mod_mp3 turns the Apache Web Server into an MP3 or Ogg streaming
server. It can play from a list of files, either in order or
randomly. It can also be used to cache MP3s into memory and have
the server operate entirely from memory.
mod_mp3 turns the Apache Web Server into an MP3 or Ogg streaming server.
It can play from a list of files, either in order or randomly. It can
also be used to cache MP3s into memory and have the server operate
entirely from memory.
Available flavors:
mysql - Fetch data from MySQL database.
postgresql - Fetch data from PostgreSQL database (alpha).
mysql - Fetch data from MySQL database.
postgresql - Fetch data from PostgreSQL database.

View File

@ -3,16 +3,12 @@ to enable the module by using the following command
${PREFIX}/sbin/${MODAPACHE_ENABLE}
Also, copy the following file into your Apache config
directory:
A sample configuration has been copied to:
/var/www/conf/modules.sample/mp3.conf
${PREFIX}/share/examples/mod_mp3/mp3.conf
Add the following line to your httpd.conf:
include conf/mp3.conf
Edit mp3.conf to suit your needs.
Modify the sample configuration and create a symbolic link:
ln -s /var/www/conf/modules.sample/mp3.conf \
/var/www/conf/modules/mp3.conf
If you already have Apache running on your machine,
you should not use "apachectl restart" - instead,

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.4 2007/06/26 19:19:46 simon Exp $
@comment $OpenBSD: PLIST,v 1.5 2008/01/30 20:41:41 okan Exp $
lib/${MODAPACHE_MODULE}
@exec-update test -f ${MODAPACHE_FINAL} && cp -fp %D/%F ${MODAPACHE_FINAL}
sbin/${MODAPACHE_ENABLE}
@ -6,6 +6,7 @@ share/doc/mod_mp3/
share/doc/mod_mp3/faq.html
share/examples/mod_mp3/
share/examples/mod_mp3/mp3.conf
@sample /var/www/conf/modules.sample/mp3.conf
%%mysql%%
%%postgresql%%
@unexec-delete rm -f ${MODAPACHE_FINAL}