New package: musikcube

This commit is contained in:
eater 2019-01-07 16:52:26 +01:00 committed by maxice8
parent 0e888bcc93
commit 08ea5a4a26
4 changed files with 145 additions and 0 deletions

View file

@ -594,6 +594,7 @@ libcanberra-gtk.so.0 libcanberra-gtk-0.30_6
libcanberra-gtk3.so.0 libcanberra-gtk3-0.30_6
libgtop-2.0.so.11 libgtop-2.38.0_1
librarian.so.0 rarian-0.8.1_1
libmusikcore.so musikcube-0.60.1_1
libgnome-menu-3.so.0 gnome-menus-2.91.6_1
libart_lgpl_2.so.2 libart-2.3.20_1
libgnomecanvas-2.so.0 libgnomecanvas-2.30.1_1

1
srcpkgs/musikcube-devel Symbolic link
View file

@ -0,0 +1 @@
musikcube

View file

@ -0,0 +1,109 @@
Currently all ELF files (binaries and libraries), get installed to /usr/share/musikcube.
This patch moves all those files to their normal locations and fixes the code to expect that
diff --git CMakeLists.txt CMakeLists.txt
index 8c2826e6..9d56b984 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -179,7 +179,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
install(FILES ${plugins} DESTINATION share/musikcube/plugins)
else ()
file(GLOB plugins "bin/plugins/*.so")
- install(FILES ${plugins} DESTINATION share/musikcube/plugins)
+ install(FILES ${plugins} DESTINATION lib/musikcube/plugins)
endif ()
file(GLOB sdk_headers "src/core/sdk/*.h")
@@ -197,20 +197,12 @@ install(FILES ${locales} DESTINATION share/musikcube/locales)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube)
else ()
- install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube)
+ install(FILES "bin/libmusikcore.so" DESTINATION lib/)
endif ()
# executable and shell script for musikcube
install(
FILES bin/musikcube
- DESTINATION share/musikcube
- PERMISSIONS
- OWNER_EXECUTE OWNER_READ OWNER_WRITE
- GROUP_EXECUTE GROUP_READ GROUP_WRITE
- WORLD_EXECUTE WORLD_READ)
-
-install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcube/musikcube"
DESTINATION bin/
PERMISSIONS
OWNER_EXECUTE OWNER_READ OWNER_WRITE
@@ -220,14 +212,6 @@ install(
# executable and shell script for daemon
install(
FILES bin/musikcubed
- DESTINATION share/musikcube
- PERMISSIONS
- OWNER_EXECUTE OWNER_READ OWNER_WRITE
- GROUP_EXECUTE GROUP_READ GROUP_WRITE
- WORLD_EXECUTE WORLD_READ)
-
-install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/src/musikcubed/musikcubed"
DESTINATION bin/
PERMISSIONS
OWNER_EXECUTE OWNER_READ OWNER_WRITE
diff --git src/core/support/Common.cpp src/core/support/Common.cpp
index 9580c2aa..694876e7 100644
--- src/core/support/Common.cpp
+++ src/core/support/Common.cpp
@@ -82,49 +82,11 @@ static inline void silentDelete(const std::string fn) {
namespace musik { namespace core {
std::string GetPluginDirectory() {
- std::string path(GetApplicationDirectory());
- path.append("/plugins/");
- return path;
+ return std::string("/usr/lib/musikcube/plugins");
}
std::string GetApplicationDirectory() {
- std::string result;
-
- #ifdef WIN32
- wchar_t widePath[2048];
- int length = GetModuleFileName(NULL, widePath, 2048);
- if (length != 0 && length < 2048) {
- result.assign(GetPath(u16to8(widePath).c_str()));
- }
- #elif __APPLE__
- char pathbuf[PATH_MAX + 1];
- uint32_t bufsize = sizeof(pathbuf);
- _NSGetExecutablePath(pathbuf, &bufsize);
- result.assign(pathbuf);
- size_t last = result.find_last_of("/");
- result = result.substr(0, last); /* remove filename component */
- #else
- char pathbuf[PATH_MAX + 1] = { 0 };
-
- #ifdef __FreeBSD__
- int mib[4];
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = KERN_PROC_PATHNAME;
- mib[3] = -1;
- size_t bufsize = sizeof(pathbuf);
- sysctl(mib, 4, pathbuf, &bufsize, nullptr, 0);
- #else
- std::string pathToProc = boost::str(boost::format("/proc/%d/exe") % (int) getpid());
- readlink(pathToProc.c_str(), pathbuf, PATH_MAX);
- #endif
-
- result.assign(pathbuf);
- size_t last = result.find_last_of("/");
- result = result.substr(0, last); /* remove filename component */
- #endif
-
- return result;
+ return std::string("/usr/share/musikcube");
}
std::string GetHomeDirectory() {

View file

@ -0,0 +1,34 @@
# Template file for 'musikcube'
pkgname=musikcube
version=0.60.1
revision=1
build_style=cmake
configure_args="-DNO_NCURSESW=1"
makedepends="boost-devel libogg-devel libmicrohttpd-devel ffmpeg-devel
libressl-devel pulseaudio-devel lame-devel zlib-devel alsa-lib-devel
libvorbis-devel libcurl-devel ncurses-devel libev-devel taglib-devel"
short_desc="Terminal-based music player in c++"
maintainer="eater <=@eater.me>"
license="BSD-3-Clause"
homepage="https://musikcube.com/"
distfiles="https://github.com/clangen/musikcube/archive/${version}.tar.gz"
checksum=7b6661673952a0a27310053ad19defea313a70f4c70aecc91e4a5d1a71bde13c
case "${XBPS_TARGET_MACHINE}" in
armv[56]*)
makedepends+=" libatomic-devel"
configure_args+=" -DCMAKE_EXE_LINKER_FLAGS='-latomic'"
;;
esac
post_install() {
vlicense LICENSE.txt
}
musikcube-devel_package() {
depends="musikcube-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
}
}