new package: csol

This commit is contained in:
Tee KOBAYASHI 2022-01-12 06:33:34 +09:00 committed by Leonid Pliushch
parent 96f40b181d
commit 3968e65d89
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,21 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
-set(CMAKE_C_FLAGS "--std=c89 -Wall -pedantic -DUSE_GETOPT")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c89 -Wall -pedantic -DUSE_GETOPT")
configure_file(csolrc csolrc COPYONLY)
file(COPY games DESTINATION .)
@@ -22,6 +22,6 @@
target_link_libraries(csol ${CURSES_LIBRARIES})
install(TARGETS csol DESTINATION bin COMPONENT binaries)
-install(FILES "${CMAKE_BINARY_DIR}/csolrc" DESTINATION /etc/xdg/csol COMPONENT config)
-install(DIRECTORY "${CMAKE_BINARY_DIR}/themes" DESTINATION /etc/xdg/csol COMPONENT config)
-install(DIRECTORY "${CMAKE_BINARY_DIR}/games" DESTINATION /etc/xdg/csol COMPONENT config)
+install(FILES "${CMAKE_BINARY_DIR}/csolrc" DESTINATION @TERMUX_PREFIX@/etc/xdg/csol COMPONENT config)
+install(DIRECTORY "${CMAKE_BINARY_DIR}/themes" DESTINATION @TERMUX_PREFIX@/etc/xdg/csol COMPONENT config)
+install(DIRECTORY "${CMAKE_BINARY_DIR}/games" DESTINATION @TERMUX_PREFIX@/etc/xdg/csol COMPONENT config)

9
packages/csol/build.sh Normal file
View File

@ -0,0 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://github.com/nielssp/csol
TERMUX_PKG_DESCRIPTION="A small collection of solitaire games implemented in C using ncurses"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.4.1
TERMUX_PKG_SRCURL=https://github.com/nielssp/csol/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=4117a9b7d6dbddb8549fa7bc8911e4bf8639f275629d428f160e7a824a29ba76
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
TERMUX_CMAKE_BUILD="Unix Makefiles"

View File

@ -0,0 +1,15 @@
--- a/src/main.c
+++ b/src/main.c
@@ -100,10 +100,10 @@
}
}
} else {
- f = fopen("/etc/xdg/csol/csolrc", "r");
+ f = fopen("@TERMUX_PREFIX@/etc/xdg/csol/csolrc", "r");
if (f) {
fclose(f);
- return strdup("/etc/xdg/csol/csolrc");
+ return strdup("@TERMUX_PREFIX@/etc/xdg/csol/csolrc");
}
}
#endif