From b59eb01d37a10351111ae33dff86efbee4237c23 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 31 Dec 2021 15:31:06 +0100 Subject: [PATCH 1/9] Synced upstream & added ci config --- .woodpecker.yml | 20 ++++++++++++++++++++ PKGBUILD | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..7929e92 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,20 @@ +pipeline: + build: + image: 'archlinux:latest' + commands: + # Update packages + - pacman -Syu --needed --noconfirm base-devel + # Create non-root user to perform build & switch to their home + - groupadd -g 1000 builder + - useradd -mg builder builder + - chown -R builder:builder "$PWD" + - "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" + - su builder + # Build the package + - makepkg -s --noconfirm --needed + + publish: + image: 'archlinux:latest' + commands: + # Publish the package + - 'curl -F "file=@$(ls *.pkg*)" -H "X-API-KEY: $API_KEY" https://pkgs.rustybever.be/api/publish' diff --git a/PKGBUILD b/PKGBUILD index dacf66f..c4b5429 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Konstantinos Sideris # Maintainer: Joseph Donofry -pkgname=nheko-git +pkgname=jjr-nheko pkgver=0.9.1.r7.gbccab87a pkgrel=1 pkgdesc="Desktop client for the Matrix protocol" @@ -10,11 +10,11 @@ arch=("i686" "x86_64" "aarch64") url="https://github.com/Nheko-Reborn/nheko" license=("GPL3") -depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent") +depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent" "qt5-imageformats" "qt-jdenticon") makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json") optdepends=("qt-jdenticon") provides=("nheko") -conflicts=("nheko") +conflicts=("nheko" "nheko-git") source=($pkgname::git+https://github.com/Nheko-Reborn/nheko.git#branch=master) md5sums=("SKIP") From cc5aee4a84c488dfee8183aece52fed968099d3c Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 31 Dec 2021 15:33:38 +0100 Subject: [PATCH 2/9] Removed added deps --- PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index c4b5429..ed83939 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,7 +10,7 @@ arch=("i686" "x86_64" "aarch64") url="https://github.com/Nheko-Reborn/nheko" license=("GPL3") -depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent" "qt5-imageformats" "qt-jdenticon") +depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent") makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json") optdepends=("qt-jdenticon") provides=("nheko") From 8f572cceaf155ead0a4623529de9cbe0d70ce185 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 31 Dec 2021 15:35:35 +0100 Subject: [PATCH 3/9] Added asciidoc dep --- PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index ed83939..bb3ad0e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,7 +10,7 @@ arch=("i686" "x86_64" "aarch64") url="https://github.com/Nheko-Reborn/nheko" license=("GPL3") -depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent") +depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent" "asciidoc") makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json") optdepends=("qt-jdenticon") provides=("nheko") From 98db60af1a533553e40fcd7ebd9824b5cb7c2423 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 31 Dec 2021 16:09:20 +0100 Subject: [PATCH 4/9] Forgot to add secret wow --- .woodpecker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 7929e92..7a82b2d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -11,10 +11,12 @@ pipeline: - "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" - su builder # Build the package - - makepkg -s --noconfirm --needed + - MAKEFLAGS="-j$(nproc)" makepkg -s --noconfirm --needed publish: image: 'archlinux:latest' commands: # Publish the package - 'curl -F "file=@$(ls *.pkg*)" -H "X-API-KEY: $API_KEY" https://pkgs.rustybever.be/api/publish' + secrets: + - api_key From 661a6e03b54e4e843566e7d1fb76c6039d956dab Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 3 Jan 2022 16:26:44 +0100 Subject: [PATCH 5/9] Moved asciidoc to makedepends --- PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index bb3ad0e..44fe9d5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Joseph Donofry pkgname=jjr-nheko -pkgver=0.9.1.r7.gbccab87a +pkgver=0.9.1.r85.g970ed56f pkgrel=1 pkgdesc="Desktop client for the Matrix protocol" arch=("i686" "x86_64" "aarch64") @@ -10,8 +10,8 @@ arch=("i686" "x86_64" "aarch64") url="https://github.com/Nheko-Reborn/nheko" license=("GPL3") -depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent" "asciidoc") -makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json") +depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent") +makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json" "asciidoc") optdepends=("qt-jdenticon") provides=("nheko") conflicts=("nheko" "nheko-git") From 9391266b6830aadb2c86ea56a4d42703ce37e4e5 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 5 Jan 2022 20:32:33 +0100 Subject: [PATCH 6/9] Hopefully added sccache config --- .gitignore | 4 ++++ .woodpecker.yml | 7 +++++++ PKGBUILD | 19 ++++++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af8ad5e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* + +!PKGBUILD +!.woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml index 7a82b2d..17f0ff6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,13 @@ pipeline: build: image: 'archlinux:latest' + environment: + - SCCACHE_BUCKET=bur + - SCCACHE_ENDPOINT=s3.rustybever.be + - SCCACHE_S3_USE_SSL=true + secrets: + - aws_access_key_id + - aws_secret_access_key commands: # Update packages - pacman -Syu --needed --noconfirm base-devel diff --git a/PKGBUILD b/PKGBUILD index 44fe9d5..70950b1 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Joseph Donofry pkgname=jjr-nheko -pkgver=0.9.1.r85.g970ed56f +pkgver=0.9.1.r86.g8d52c17f pkgrel=1 pkgdesc="Desktop client for the Matrix protocol" arch=("i686" "x86_64" "aarch64") @@ -10,8 +10,8 @@ arch=("i686" "x86_64" "aarch64") url="https://github.com/Nheko-Reborn/nheko" license=("GPL3") -depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent") -makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json" "asciidoc") +depends=("qt5-base" "lmdb" "qt5-graphicaleffects" "qt5-multimedia" "qt5-svg" "qt5-quickcontrols2" "qt5-declarative" "qtkeychain-qt5" "cmark" "openssl" "hicolor-icon-theme" "gstreamer" "gst-plugins-base" "gst-plugins-good" "gst-plugins-bad" "gst-plugin-qmlgl" "libnice" "libolm" "spdlog" "curl" "libevent" "qt5-imageformats") +makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools" "nlohmann-json" "asciidoc" "sccache") optdepends=("qt-jdenticon") provides=("nheko") conflicts=("nheko" "nheko-git") @@ -33,8 +33,17 @@ build() { rm -f cmake/FindOlm.cmake - cmake -H. -Bbuild -DHUNTER_ENABLED=OFF -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_MTXCLIENT=ON -DUSE_BUNDLED_COEURL=ON -DUSE_BUNDLED_LMDBXX=ON -DCMAKE_INSTALL_PREFIX=.deps/usr -DCMAKE_BUILD_TYPE=Release - cmake --build build --config Release + cmake -H. -Bbuild \ + -DHUNTER_ENABLED=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DUSE_BUNDLED_MTXCLIENT=ON \ + -DUSE_BUNDLED_COEURL=ON \ + -DUSE_BUNDLED_LMDBXX=ON \ + -DCMAKE_INSTALL_PREFIX=.deps/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER=sccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache + SCCACHE_S3_KEY_PREFIX="$pkgname" cmake --build build --config Release } package() { From b4a8606393555c1757c5eb0d937ca9859ebc0c48 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 2 Feb 2022 11:35:01 +0100 Subject: [PATCH 7/9] Switched to vieter server --- .SRCINFO | 43 ------------------------------------------- .woodpecker.yml | 3 ++- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 .SRCINFO diff --git a/.SRCINFO b/.SRCINFO deleted file mode 100644 index f2ab9a8..0000000 --- a/.SRCINFO +++ /dev/null @@ -1,43 +0,0 @@ -pkgbase = nheko-git - pkgdesc = Desktop client for the Matrix protocol - pkgver = 0.9.1.r7.gbccab87a - pkgrel = 1 - url = https://github.com/Nheko-Reborn/nheko - arch = i686 - arch = x86_64 - arch = aarch64 - license = GPL3 - makedepends = git - makedepends = cmake - makedepends = gcc - makedepends = fontconfig - makedepends = qt5-tools - makedepends = nlohmann-json - depends = qt5-base - depends = lmdb - depends = qt5-graphicaleffects - depends = qt5-multimedia - depends = qt5-svg - depends = qt5-quickcontrols2 - depends = qt5-declarative - depends = qtkeychain-qt5 - depends = cmark - depends = openssl - depends = hicolor-icon-theme - depends = gstreamer - depends = gst-plugins-base - depends = gst-plugins-good - depends = gst-plugins-bad - depends = gst-plugin-qmlgl - depends = libnice - depends = libolm - depends = spdlog - depends = curl - depends = libevent - optdepends = qt-jdenticon - provides = nheko - conflicts = nheko - source = nheko-git::git+https://github.com/Nheko-Reborn/nheko.git#branch=master - md5sums = SKIP - -pkgname = nheko-git diff --git a/.woodpecker.yml b/.woodpecker.yml index 17f0ff6..31df694 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,7 @@ pipeline: build: image: 'archlinux:latest' + pull: true environment: - SCCACHE_BUCKET=bur - SCCACHE_ENDPOINT=s3.rustybever.be @@ -24,6 +25,6 @@ pipeline: image: 'archlinux:latest' commands: # Publish the package - - 'curl -F "file=@$(ls *.pkg*)" -H "X-API-KEY: $API_KEY" https://pkgs.rustybever.be/api/publish' + - 'curl -s -XPOST -H "X-API-KEY: $API_KEY" -T "$(ls *.pkg*)" https://arch.r8r.be/publish' secrets: - api_key From 8c3d28cf47d05082fc849ecbfbf32f3a8546558f Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 2 Feb 2022 11:43:39 +0100 Subject: [PATCH 8/9] Added platform restriction --- .woodpecker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 31df694..36d8962 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,5 @@ +platform: linux/amd64 + pipeline: build: image: 'archlinux:latest' From 68d9e3a14933c0b5fbdafbc6a5017200d794246a Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Tue, 19 Apr 2022 13:36:44 +0200 Subject: [PATCH 9/9] PKGBUILD now properly uses cmake --- PKGBUILD | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 70950b1..6cefb61 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Joseph Donofry pkgname=jjr-nheko -pkgver=0.9.1.r86.g8d52c17f +pkgver=0.9.3.r66.g7138c7a4 pkgrel=1 pkgdesc="Desktop client for the Matrix protocol" arch=("i686" "x86_64" "aarch64") @@ -19,27 +19,21 @@ conflicts=("nheko" "nheko-git") source=($pkgname::git+https://github.com/Nheko-Reborn/nheko.git#branch=master) md5sums=("SKIP") -prepare() { - cd "$pkgname" -} - pkgver() { cd "$pkgname" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "$pkgname" + rm -f "$pkgname"/cmake/FindOlm.cmake - rm -f cmake/FindOlm.cmake - - cmake -H. -Bbuild \ + cmake -B build -S "$pkgname" -Wno-dev \ + -DCMAKE_INSTALL_PREFIX=/usr \ -DHUNTER_ENABLED=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DUSE_BUNDLED_MTXCLIENT=ON \ -DUSE_BUNDLED_COEURL=ON \ -DUSE_BUNDLED_LMDBXX=ON \ - -DCMAKE_INSTALL_PREFIX=.deps/usr \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache @@ -47,23 +41,5 @@ build() { } package() { - # Creating needed directories - install -dm755 "$pkgdir/usr/bin" - install -dm755 "$pkgdir/usr/share/pixmaps/" - install -dm755 "$pkgdir/usr/share/applications/" - - # Program - install -Dm755 "$pkgname/build/nheko" "$pkgdir/usr/bin/nheko" - - # Desktop launcher - install -Dm644 "$srcdir/$pkgname/resources/nheko-256.png" "$pkgdir/usr/share/pixmaps/nheko.png" - install -Dm644 "$srcdir/$pkgname/resources/nheko.desktop" "$pkgdir/usr/share/applications/nheko.desktop" - - # Icons - local icon_size icon_dir - for icon_size in 16 32 48 64 128 256 512; do - icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" - install -d "$icon_dir" - install -m644 "$srcdir/$pkgname/resources/nheko-${icon_size}.png" "$icon_dir/nheko.png" - done + DESTDIR="$pkgdir" cmake --install build }