diff options
author | Camber Huang | 2022-05-24 01:23:12 +0800 |
---|---|---|
committer | Camber Huang | 2022-05-24 01:23:12 +0800 |
commit | 098bab753b10726bd1236fca0620a0d01a7caa31 (patch) | |
tree | 43e0c470cf516d941ba61bfdc69ce43776aa903a | |
download | aur-098bab753b10726bd1236fca0620a0d01a7caa31.tar.gz |
openixcard: initial commit, version 1.0.1 with patches
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-DO-NOT-MERGE-Workaround-for-3.patch | 59 | ||||
-rw-r--r-- | PKGBUILD | 62 |
3 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..03230ec57274 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = openixcard + pkgver = 1.0.1 + pkgrel = 1 + url = https://github.com/YuzukiTsuru/OpenixCard + arch = x86_64 + license = GPL + makedepends = cmake + depends = glibc + source = openixcard-1.0.1::git+https://github.com/YuzukiTsuru/OpenixCard.git#tag=1.0.1 + source = git+https://github.com/YuzukiTsuru/ColorCout.git + source = git+https://github.com/p-ranav/argparse.git + source = git+https://github.com/arun11299/cpp-subprocess.git + source = git+https://github.com/ArthurSonzogni/FTXUI.git + source = git+https://github.com/SemaiCZE/inicpp.git + source = 0001-DO-NOT-MERGE-Workaround-for-3.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = f53c3d2493ceaf32f277bbba24be58c684f191e284b0b28fbec5c6eb7e9b8a3e + +pkgname = openixcard diff --git a/0001-DO-NOT-MERGE-Workaround-for-3.patch b/0001-DO-NOT-MERGE-Workaround-for-3.patch new file mode 100644 index 000000000000..de3b7eac26ff --- /dev/null +++ b/0001-DO-NOT-MERGE-Workaround-for-3.patch @@ -0,0 +1,59 @@ +From b4bbce879c44f6a7f01063a585e2e0d445f6d848 Mon Sep 17 00:00:00 2001 +From: Camber Huang <camber@poi.science> +Date: Tue, 24 May 2022 01:17:03 +0800 +Subject: [PATCH] [DO NOT MERGE] Workaround for #3 - alter the searching path + of genimage - alter the installation path in CMakeList.txt + +Signed-off-by: Camber Huang <camber@poi.science> +--- + CMakeLists.txt | 4 ++-- + src/OpenixCard/Genimage.cpp | 6 +++++- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d2afa55..da5f928 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,13 +72,13 @@ else () + install( + TARGETS OpenixCard + COMPONENT applications +- DESTINATION "opt/openixcard/bin" ++ DESTINATION "bin" + ) + + install( + FILES "${EXECUTABLE_OUTPUT_PATH}/bin/genimage" + COMPONENT applications +- DESTINATION "opt/openixcard/bin/bin" ++ DESTINATION "libexec/openixcard" + ) + + include(CMake/cpack.cmake) +diff --git a/src/OpenixCard/Genimage.cpp b/src/OpenixCard/Genimage.cpp +index 22f313e..b922b14 100644 +--- a/src/OpenixCard/Genimage.cpp ++++ b/src/OpenixCard/Genimage.cpp +@@ -13,6 +13,8 @@ + #include <filesystem> + #include <fstream> + #include <iostream> ++#include <cstdlib> ++#include <string> + + #include <subprocess.hpp> + +@@ -22,7 +24,9 @@ + + [[maybe_unused]] Genimage::Genimage(std::string config_path, std::string image_path, std::string output_path) + : config_path(std::move(config_path)), image_path(std::move(image_path)), output_path(std::move(output_path)) { +- this->genimage_bin = std::filesystem::current_path() / "bin/genimage"; ++ // this->genimage_bin = std::filesystem::current_path() / "bin/genimage"; ++ // A temporary workaround for #3 ++ this->genimage_bin = std::string("/usr/libexec/openixcard/genimage"); + // generate blank.fex file for commented partition + generate_blank_fex(); + // call genimage +-- +2.36.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a76c0821a385 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Camber Huang <camber@poi.science> +pkgname=openixcard +pkgver=1.0.1 +pkgrel=1 +pkgdesc="" +arch=("x86_64") +url="https://github.com/YuzukiTsuru/OpenixCard" +license=('GPL') +groups=() +depends=('glibc') +makedepends=('cmake') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=("${pkgname}-${pkgver}::git+https://github.com/YuzukiTsuru/OpenixCard.git#tag=1.0.1" + "git+https://github.com/YuzukiTsuru/ColorCout.git" + "git+https://github.com/p-ranav/argparse.git" + "git+https://github.com/arun11299/cpp-subprocess.git" + "git+https://github.com/ArthurSonzogni/FTXUI.git" + "git+https://github.com/SemaiCZE/inicpp.git" + "0001-DO-NOT-MERGE-Workaround-for-3.patch") +noextract=() +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'f53c3d2493ceaf32f277bbba24be58c684f191e284b0b28fbec5c6eb7e9b8a3e') + +prepare() { + pushd $pkgname-$pkgver + patch -Np1 -i ../0001-DO-NOT-MERGE-Workaround-for-3.patch + git submodule init + git config submodule.lib/ColorCout.url "$srcdir/ColorCout" + git config submodule.lib/argparse.url "$srcdir/argparse" + git config submodule.lib/cpp-subprocess.url "$srcdir/cpp-subprocess" + git config submodule.lib/ftxui.url "$srcdir/FTXUI" + git config submodule.lib/inicpp.url "$srcdir/inicpp" + git submodule update + pushd lib/argparse + git checkout 95d4850 include/argparse/argparse.hpp + popd + popd +} + +build() { + cmake -B build -S $pkgname-$pkgver \ + -Wno-dev \ + -DCMAKE_INSTALL_PREFIX='/usr' + cmake --build build +} + +package() { + DESTDIR="$pkgdir" cmake --install build + chmod +x $pkgdir/usr/libexec/openixcard/genimage +} |