deezer (on-demand music) access from openbsd.
This commit is contained in:
parent
224ae888ac
commit
50799d3b86
28
net/dysnomia/Makefile
Normal file
28
net/dysnomia/Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/12/25 10:02:58 espie Exp $
|
||||
|
||||
CATEGORIES = net audio www
|
||||
COMMENT = interface to the deezer on-demand music system
|
||||
HOMEPAGE = http://dysnomia-project.org/
|
||||
MASTER_SITES = ${HOMEPAGE}
|
||||
|
||||
DISTNAME = dysnomia-en-0.3.4
|
||||
EXTRACT_SUFX = .tgz
|
||||
|
||||
# GPLv2 or later
|
||||
PERMIT_DISTFILES_CDROM = Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
|
||||
LIB_DEPENDS = wx_base,wx_base_net,wx_base_odbc,wx_base_xml,wx_gtk2_adv,wx_gtk2_aui,wx_gtk2_core,wx_gtk2_dbgrid,wx_gtk2_html,wx_gtk2_qa,wx_gtk2_xrc::x11/wxWidgets \
|
||||
curl::net/curl
|
||||
WANTLIB = c m pthread stdc++
|
||||
|
||||
MAKE_FLAGS = \
|
||||
LIBS="$(CXXFLAGS) `wx-config --libs` -L${LOCALBASE}/lib -lcurl" \
|
||||
CXXFLAGS="`wx-config --cxxflags` $(CXXFLAGS) -Wall"
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/dysnomia ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
5
net/dysnomia/distinfo
Normal file
5
net/dysnomia/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (dysnomia-en-0.3.4.tgz) = xvMoBfhQ5bqgGMcQOyQYeA==
|
||||
RMD160 (dysnomia-en-0.3.4.tgz) = 3nddJ/oZ5C2wIg4OA02y/EjXP8k=
|
||||
SHA1 (dysnomia-en-0.3.4.tgz) = CLdEjh/RKmKYXVGiUrtwO5VIKrs=
|
||||
SHA256 (dysnomia-en-0.3.4.tgz) = /QiBM5FbnHR4vLKt1MM54H9ZLXd1nLHbFqo2i8cbsio=
|
||||
SIZE (dysnomia-en-0.3.4.tgz) = 15521
|
59
net/dysnomia/patches/patch-deezer_cpp
Normal file
59
net/dysnomia/patches/patch-deezer_cpp
Normal file
@ -0,0 +1,59 @@
|
||||
$OpenBSD: patch-deezer_cpp,v 1.1.1.1 2007/12/25 10:02:58 espie Exp $
|
||||
--- deezer.cpp.orig Tue Dec 25 10:45:07 2007
|
||||
+++ deezer.cpp Tue Dec 25 10:50:18 2007
|
||||
@@ -300,6 +300,19 @@ void parse_searchresults(vector<song>* res, char* buf,
|
||||
}
|
||||
|
||||
|
||||
+FILE *tempfile()
|
||||
+{
|
||||
+ FILE *f = NULL;
|
||||
+ char t[] = "/tmp/deezer.XXXXXXX";
|
||||
+ int fd = mkstemp(t);
|
||||
+ if (fd != -1) {
|
||||
+ unlink(t);
|
||||
+ f = fdopen(fd, "w+");
|
||||
+ if (f == NULL)
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ return f;
|
||||
+}
|
||||
|
||||
|
||||
vector<song>* search_deezer(const char* search)
|
||||
@@ -348,7 +361,7 @@ vector<song>* search_deezer(const char* search)
|
||||
postfield[current]=search_encrypted[i];
|
||||
++current;
|
||||
}
|
||||
- FILE* searchres_fd=fopen(TEMP_SEARCHRESULTS_FILENAME, "wb");
|
||||
+ FILE* searchres_fd=tempfile();
|
||||
if(searchres_fd==NULL)
|
||||
{
|
||||
cerr<<"Error : unable to open the search results file. Permissions problem ?"<<endl;
|
||||
@@ -378,24 +391,13 @@ vector<song>* search_deezer(const char* search)
|
||||
curl_slist_free_all(headers);
|
||||
curl_easy_cleanup(easyhandle);
|
||||
|
||||
- fclose(searchres_fd);
|
||||
-
|
||||
- searchres_fd=fopen(TEMP_SEARCHRESULTS_FILENAME, "rb");
|
||||
- if(searchres_fd==NULL)
|
||||
- {
|
||||
- cerr<<"Error : unable to open the search results file. Permissions problem ?"<<endl;
|
||||
- exit(42);
|
||||
- }
|
||||
+ fflush(searchres_fd);
|
||||
+ rewind(searchres_fd);
|
||||
fsize=filesize(searchres_fd);
|
||||
bufsearch=new char[fsize+1];
|
||||
fread(bufsearch, 1, fsize, searchres_fd);
|
||||
fclose(searchres_fd);
|
||||
|
||||
- if(unlink(TEMP_SEARCHRESULTS_FILENAME)==-1)
|
||||
- {
|
||||
- cerr<<"Error : unable to delete the search results file. Permissions problem ?"<<endl;
|
||||
- exit(42);
|
||||
- }
|
||||
parse_searchresults(res, bufsearch, fsize);
|
||||
|
||||
delete bufsearch;
|
21
net/dysnomia/pkg/DESCR
Executable file
21
net/dysnomia/pkg/DESCR
Executable file
@ -0,0 +1,21 @@
|
||||
Dysnomia is a program that *shows the possibility* to download songs
|
||||
from on-demand music websites (only the deezer.com website in this
|
||||
version). It's only a proof of concept of that possibility, and
|
||||
its main interest is in its code and how it works, not in using
|
||||
it to download songs on these websites.
|
||||
|
||||
It must *not* be used to download songs that are copyrighted and
|
||||
licensed under a license that does not allow freely copying. Such
|
||||
an utilization of that program is illegal. If you intend to use
|
||||
that program to do that, you and you only take responsability for
|
||||
that.
|
||||
|
||||
If you wish to test the program, try for example the "tryad" search
|
||||
request : tryad is a an Internet-based musical group that publish
|
||||
all their works under a Creative Commons license, allowing it to
|
||||
be freely copied and diffused.
|
||||
|
||||
Dysnomia 0.3.4 allows you to download using two different modes :
|
||||
the "regular" one, wich has exactly the same behaviour as the
|
||||
deezer.com flash applet, and the "alternative" one, wich downloads
|
||||
by directly accessing the deezer.com cache.
|
2
net/dysnomia/pkg/PLIST
Normal file
2
net/dysnomia/pkg/PLIST
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/12/25 10:02:58 espie Exp $
|
||||
bin/dysnomia
|
Loading…
Reference in New Issue
Block a user