new package: komorebi

This commit is contained in:
Tee KOBAYASHI 2022-11-29 02:26:02 +09:00 committed by xtkoba
parent 56f38690d0
commit 344498c3f6
5 changed files with 127 additions and 0 deletions

View File

@ -0,0 +1,41 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,25 +81,26 @@
target_link_libraries(komorebi ${DEPS_LIBRARIES} -lm)
target_link_libraries(komorebi-wallpaper-creator ${DEPS_LIBRARIES} -lm)
-install(TARGETS komorebi RUNTIME DESTINATION /System/Applications/)
-install(TARGETS komorebi-wallpaper-creator RUNTIME DESTINATION /System/Applications/)
+install(TARGETS komorebi RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+install(TARGETS komorebi-wallpaper-creator RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
######### Wallpapers ############
-install(DIRECTORY data/Wallpapers/ DESTINATION /System/Resources/Komorebi)
+install(DIRECTORY data/Wallpapers/ DESTINATION "${PKGDATADIR}")
######### Fonts ############
-install(DIRECTORY data/Fonts/ DESTINATION /usr/share/fonts)
+install(DIRECTORY data/Fonts/ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/fonts")
######### Icons ############
-install(DIRECTORY data/Icons/ DESTINATION /System/Resources/Komorebi)
+install(DIRECTORY data/Icons/ DESTINATION "${PKGDATADIR}")
######### Other ############
-install(FILES data/Other/komorebi.desktop DESTINATION /usr/share/applications/)
-install(FILES data/Other/wallpapercreator.desktop DESTINATION /usr/share/applications/)
+install(FILES data/Other/komorebi.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications/")
+install(FILES data/Other/wallpapercreator.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications/")
######### Run the upgrade script #########
+if(FALSE)
install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/data/Other/postinst.sh)")
# Packaging configuration
@@ -121,3 +122,4 @@
set(CPACK_DEBIAN_PACKAGE_SECTION "system")
include(CPack)
+endif(FALSE)

View File

@ -0,0 +1,19 @@
TERMUX_PKG_HOMEPAGE=https://github.com/cheesecakeufo/komorebi
TERMUX_PKG_DESCRIPTION="Animated Wallpapers for Linux"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1
TERMUX_PKG_SRCURL=https://github.com/cheesecakeufo/komorebi/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=66ee2fe21e16c3f9c18b824fa88a8b726812b1fdd81217cb53f7dad8d6dbae0f
TERMUX_PKG_DEPENDS="clutter, clutter-gst, clutter-gtk, gdk-pixbuf, glib, gstreamer, gtk3, komorebi-data, libgee, webkit2gtk-4.1"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner, valac"
termux_step_post_get_source() {
sed -i 's/\(webkit2gtk-4.\)0/\11/g' CMakeLists.txt
find . -type f -name '*.vala' -o -name '*.desktop' | xargs -n 1 sed -i \
"s:/System/Resources/Komorebi:${TERMUX_PREFIX}/share/komorebi:g"
}
termux_step_pre_configure() {
termux_setup_gir
}

View File

@ -0,0 +1,29 @@
--- a/extra/wallpaper-creator/OnScreen/InitialPage.vala
+++ b/extra/wallpaper-creator/OnScreen/InitialPage.vala
@@ -39,7 +39,7 @@
Label chooseFileLabel = new Label("Where is the image located?");
Box locationBox = new Box(Orientation.HORIZONTAL, 10);
- Entry locationEntry = new Entry() { placeholder_text = "/Users/cheesecakeufo/my_picture.jpg" };
+ Entry locationEntry = new Entry() { placeholder_text = "@TERMUX_HOME@/my_picture.jpg" };
FileChooserButton chooseFileButton = new FileChooserButton("Choose File", Gtk.FileChooserAction.OPEN);
Revealer revealer = new Revealer();
@@ -105,7 +105,7 @@
chooseFileButton.set_filter (imageFilter);
chooseFileLabel.label = "Where is the image located?";
- locationEntry.placeholder_text = "/Users/cheesecakeufo/my_picture.jpg";
+ locationEntry.placeholder_text = "@TERMUX_HOME@/my_picture.jpg";
locationEntry.set_sensitive(false);
revealer.set_reveal_child(false);
@@ -127,7 +127,7 @@
chooseFileButton.set_filter (videoFilter);
chooseFileLabel.label = "Where is the video located?";
- locationEntry.placeholder_text = "/Users/cheesecakeufo/my_video.mp4";
+ locationEntry.placeholder_text = "@TERMUX_HOME@/my_video.mp4";
locationEntry.set_sensitive(false);
revealer.set_reveal_child(true);

View File

@ -0,0 +1,6 @@
TERMUX_SUBPKG_DESCRIPTION="Platform-independent data for komorebi"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="
share/fonts/
share/komorebi/
"

View File

@ -0,0 +1,32 @@
--- a/src/Utilities.vala
+++ b/src/Utilities.vala
@@ -114,7 +114,7 @@
Gtk.IconTheme _IconTheme = Gtk.IconTheme.get_default ();
- _IconTheme.prepend_search_path("/usr/share/pixmaps/");
+ _IconTheme.prepend_search_path("@TERMUX_PREFIX@/share/pixmaps/");
try {
@@ -238,7 +238,7 @@
new GLib.Settings("org.gnome.desktop.background").set_boolean("show-desktop-icons", false);
// Check if we have nemo installed
- SettingsSchemaSource settingsSchemaSource = new SettingsSchemaSource.from_directory ("/usr/share/glib-2.0/schemas", null, false);
+ SettingsSchemaSource settingsSchemaSource = new SettingsSchemaSource.from_directory ("@TERMUX_PREFIX@/share/glib-2.0/schemas", null, false);
SettingsSchema settingsSchema = settingsSchemaSource.lookup ("org.nemo.desktop", false);
if (settingsSchema != null)
@@ -367,10 +367,7 @@
/* A dirty way to check if gstreamer is installed */
public bool canPlayVideos() {
- if( File.new_for_path("/usr/lib/gstreamer-1.0/libgstlibav.so").query_exists() ||
- File.new_for_path("/usr/lib64/gstreamer-1.0/libgstlibav.so").query_exists() ||
- File.new_for_path("/usr/lib/i386-linux-gnu/gstreamer-1.0/libgstlibav.so").query_exists() ||
- File.new_for_path("/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so").query_exists())
+ if( File.new_for_path("@TERMUX_PREFIX@/lib/gstreamer-1.0/libgstlibav.so").query_exists())
return true;
return false;