Skip to content

Commit 8fdb6c5

Browse files
committed
#3461 aur: build app with cmake and system libraries
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent 569b977 commit 8fdb6c5

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

build-systems/aur/.SRCINFO

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ pkgbase = qownnotes
1010
groups = qownnotes
1111
license = GPL2
1212
makedepends = qt6-tools
13+
makedepends = cmake
1314
depends = qt6-base
1415
depends = qt6-svg
1516
depends = qt6-declarative
1617
depends = qt6-websockets
1718
depends = aspell
19+
depends = botan
20+
depends = libgit2
1821
source = https://github.com/pbek/QOwnNotes/releases/download/vVERSION-STRING/qownnotes-VERSION-STRING.tar.xz
1922
sha256sums = ARCHIVE-SHA256
2023

build-systems/aur/PKGBUILD

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ arch=('i686' 'x86_64' 'armv7h' 'aarch64')
1010
url='https://www.qownnotes.org/'
1111
license=('GPL2')
1212
groups=('qownnotes')
13-
depends=('qt6-base' 'qt6-svg' 'qt6-declarative' 'qt6-websockets' 'aspell')
14-
makedepends=('qt6-tools')
13+
depends=('qt6-base' 'qt6-svg' 'qt6-declarative' 'qt6-websockets' 'aspell' 'botan' 'libgit2')
14+
makedepends=('qt6-tools' 'cmake')
1515
source=("https://github.com/pbek/QOwnNotes/releases/download/v${pkgver}/qownnotes-${pkgver}.tar.xz")
1616
sha256sums=('ARCHIVE-SHA256')
1717

@@ -22,24 +22,22 @@ prepare() {
2222

2323
build() {
2424
cd "${pkgname}-${pkgver}"
25-
qmake6 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}"
26-
make
25+
cmake -B build \
26+
-DCMAKE_BUILD_TYPE=Release \
27+
-DCMAKE_INSTALL_PREFIX=/usr \
28+
-DQON_QT6_BUILD=ON \
29+
-DBUILD_WITH_SYSTEM_BOTAN=ON \
30+
-DBUILD_WITH_LIBGIT2=ON \
31+
-DBUILD_WITH_ASPELL=ON \
32+
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
33+
-DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
34+
-DCMAKE_EXE_LINKER_FLAGS_RELEASE="${LDFLAGS}"
35+
cmake --build build
2736
}
2837

2938
package() {
3039
cd "${pkgname}-${pkgver}"
3140

32-
# install application
33-
install -D -m755 QOwnNotes "${pkgdir}/usr/bin/QOwnNotes"
34-
35-
# install visuals
36-
install -D -m644 PBE.QOwnNotes.desktop "${pkgdir}/usr/share/applications/PBE.QOwnNotes.desktop"
37-
for format in {16x16,24x24,32x32,48x48,64x64,96x96,128x128,256x256,512x512}; do
38-
install -D -m644 "images/icons/${format}/apps/QOwnNotes.png" "${pkgdir}/usr/share/icons/hicolor/$format/apps/QOwnNotes.png"
39-
done
40-
install -D -m644 "images/icons/scalable/apps/QOwnNotes.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/QOwnNotes.svg"
41-
42-
# install languages
43-
install -d "${pkgdir}/usr/share/qt6/translations/"
44-
install -D -m644 languages/*.qm "${pkgdir}/usr/share/qt6/translations/"
41+
# Use cmake install target
42+
DESTDIR="${pkgdir}" cmake --install build
4543
}

0 commit comments

Comments
 (0)