Skip to content

Commit a0ceb0a

Browse files
committed
add install config to CMakeLists
1 parent 4dfca86 commit a0ceb0a

6 files changed

Lines changed: 57 additions & 48 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
2525
matrix:
2626
os: [ubuntu-latest, windows-latest]
27-
build_type: [Release]
27+
build_type: [RelWithDebInfo]
2828
c_compiler: [gcc, clang, cl]
2929
include:
3030
- os: windows-latest

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@
5353
*.AppImage
5454

5555
/CMakeUserPresets.json
56+
57+
# Arch Linux
58+
/.SRCINFO
59+
/src
60+
/pkg
61+
*.tar.zst

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,10 @@ if(PKG_BUILD_TESTS)
210210
message("libuncso2: Building tests")
211211
add_subdirectory(tests)
212212
endif()
213+
214+
#
215+
# Installation rules
216+
#
217+
218+
install(TARGETS uncso2 DESTINATION lib)
219+
install(DIRECTORY ${PKG_PUBLIC_HEADERS_ROOT_DIR}/ DESTINATION include/libuncso2)

PKGBUILD

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
pkgname=libuncso2
2+
pkgver=1.2.0
3+
pkgrel=1
4+
pkgdesc="Backend for UnCSO2 (binary release)"
5+
arch=(any)
6+
url="https://github.com/harmonytf/libuncso2"
7+
license=(GPL-3.0-only)
8+
makedepends=(cmake)
9+
source=()
10+
11+
prepare() {
12+
ln -snf "$startdir" "$srcdir"
13+
}
14+
15+
build() {
16+
cmake -B build -S "$pkgname" \
17+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
18+
-DCMAKE_INSTALL_PREFIX=/usr \
19+
-Wno-dev
20+
cmake --build build
21+
}
22+
23+
check() {
24+
# TODO: Currently broken
25+
ctest --test-dir "$pkgname/build" --output-on-failure
26+
}
27+
28+
package() {
29+
DESTDIR="$pkgdir" cmake --install build
30+
31+
rm -rf "$pkgdir/usr/bin/cryptest"
32+
rm -rf "$pkgdir/usr/include/cryptopp"
33+
rm -rf "$pkgdir/usr/lib/libcryptopp.a"
34+
rm -rf "$pkgdir/usr/share/cmake"
35+
rm -rf "$pkgdir/usr/share/cryptopp"
36+
rm -rf "$pkgdir/usr/share/pkgconfig/cryptopp.pc"
37+
38+
rm -rf "$pkgdir/usr/bin"
39+
rm -rf "$pkgdir/usr/share"
40+
}

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ It's based on the ekey's reversing work of at [XeNTaX's forums](https://forum.xe
99
Used as the back-end for the GUI program [UnCSO2](https://github.com/harmonytf/UnCSO2).
1010

1111
Tested on:
12-
- GNU/Linux - GCC 8.3.0 (64 bits)
13-
- GNU/Linux - Clang 8.0.0 (64 bits)
12+
13+
- GNU/Linux - GCC 15.2.1 (64 bits)
14+
- GNU/Linux - Clang 21.1.4 (64 bits)
1415
- Windows 10 - MSVC 2022 (64 bits)
1516

1617
## Features

appveyor.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)