summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntiCompositeNumber2020-06-06 11:18:54 -0400
committerAntiCompositeNumber2020-06-06 11:18:54 -0400
commit3d4331c18fb995760ebe36e764ab27c311e0d0be (patch)
treefbfc5babc28f02bd584887cee1cd95bdd6856aa4
parent29ac814a90cf4d8d403306e94801c085c91ac964 (diff)
downloadaur-3d4331c18fb995760ebe36e764ab27c311e0d0be.tar.gz
Rewrite PKGBUILD for Huggle 3.4.10+
Remove yaml-cpp hack (fixed upstream) Specify extension submodules in source array Patch extension directories (https://phabricator.wikimedia.org/T251049)
-rw-r--r--PKGBUILD82
-rw-r--r--extensions.patch112
2 files changed, 176 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 40b208443b0c..53ccee882b3b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,76 @@
-# Maintainer: Tanner Filip <tannerremovemefilip at gmail dot com>
+# Maintainer: AntiCompositeNumber <anticompositenumber+aur at gmail dot com>
+# Contributor: Tanner Filip <tannerremovemefilip at gmail dot com>
# For contact, remove "removeme" and replace words with symbols as necessary.
pkgname=huggle-git
-pkgver=r.
-pkgver() {
- cd "$srcdir/huggle3-qt-lx"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-}
+pkgver=3.4.10.r29.g40bf0269
pkgrel=1
-pkgdesc="Huggle Anti-Vandalism tool for Wikipedia"
+pkgdesc="Anti-vandalism tool for use on MediaWiki-based projects"
arch=('i686' 'x86_64')
url="https://en.wikipedia.org/wiki/Wikipedia:Huggle"
license=('GPL')
-makedepends=('git' 'qconf')
-groups=('base-devel')
-source=('git+https://github.com/huggle/huggle3-qt-lx.git')
-md5sums=('SKIP')
+depends=('qt5-multimedia' 'qt5-webengine' 'yaml-cpp')
+makedepends=('cmake' 'git')
+provides=('huggle')
+conflicts=('huggle')
+source=(
+ "${pkgname}::git+https://github.com/huggle/huggle3-qt-lx.git"
+ "git+https://github.com/grumpy-irc/libirc.git"
+ "git+https://github.com/huggle/mass-delivery.git"
+ "git+https://github.com/huggle/enwiki.git"
+ "git+https://github.com/huggle/extension-thanks.git"
+ "git+https://github.com/huggle/extension-splitter-helper.git"
+ "git+https://github.com/huggle/extension-review.git"
+ "git+https://github.com/huggle/extension-mass-delete.git"
+ "git+https://github.com/huggle/extension-scoring.git"
+ "git+https://github.com/huggle/extension-flow"
+ "extensions.patch"
+)
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
+ '53f138bca0e4e67376a152c9ba290e3fde19c12ab58e0c7b581460e8ede5ce8c')
+
+prepare() {
+ cd "${pkgname}"
+ git submodule init src/extensions
+ git submodule init src/3rd/libirc
+ git config submodule.src/3rd/libirc.url "${srcdir}/libirc"
+ git config submodule.src/extensions/mass-delivery.url "${srcdir}/mass-delivery"
+ git config submodule.src/extensions/enwiki.url "${srcdir}/enwiki"
+ git config submodule.src/extensions/extension-thanks.url "${srcdir}/extension-thanks"
+ git config submodule.src/extensions/extension-splitter-helper.url \
+ "${srcdir}/extension-splitter-helper"
+ git config submodule.src/extensions/extension-review.url "${srcdir}/extension-review"
+ git config submodule.src/extensions/extension-mass-delete.url \
+ "${srcdir}/extension-mass-delete"
+ git config submodule.src/extensions/extension-scoring.url "${srcdir}/extension-scoring"
+ git config submodule.src/extensions/extension-flow.url "${srcdir}/extension-flow"
+ git submodule update
+ git submodule foreach 'git reset --hard'
+ patch --forward --strip=1 --input="../extensions.patch"
+ cd "src/huggle_core"
+ ./update.sh
+}
+pkgver() {
+ cd "${pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
build() {
- cd "$srcdir/huggle3-qt-lx/huggle"
- cmake . -DCMAKE_INSTALL_PREFIX=/usr
- make
+ export CFLAGS+=" ${CPPFLAGS}"
+ export CXXFLAGS+=" ${CPPFLAGS}"
+ cmake -B build \
+ -S "${pkgname}/src" \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_DATA_DIR="lib/huggle" \
+ -DQT5_BUILD=ON \
+ -DWEB_ENGINE=ON \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DHUGGLE_EXT=TRUE \
+ -Wno-dev \
+
+ make -C build
}
package() {
- cd "$srcdir/huggle3-qt-lx/huggle"
- make DESTDIR=$pkgdir install
+ make DESTDIR="$pkgdir/" -C build install
}
-
-# vim:set ts=2 sw=2 et:
diff --git a/extensions.patch b/extensions.patch
new file mode 100644
index 000000000000..ea16e33bbe10
--- /dev/null
+++ b/extensions.patch
@@ -0,0 +1,112 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index b7530e8f..4316a369 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@ install(FILES ${CMAKE_SOURCE_DIR}/huggle_res/Resources/huggle3_newlogo.png DESTI
+ if (LINUX_SNAP)
+ install(DIRECTORY scripts/ DESTINATION bin/extensions FILES_MATCHING PATTERN "*.js")
+ else()
+- install(DIRECTORY scripts/ DESTINATION share/huggle/extensions FILES_MATCHING PATTERN "*.js")
++ install(DIRECTORY scripts/ DESTINATION lib/huggle/extensions FILES_MATCHING PATTERN "*.js")
+ endif()
+
+ include(CPack)
+Submodule src/extensions/enwiki contains modified content
+diff --git a/src/extensions/enwiki/CMakeLists.txt b/src/extensions/enwiki/CMakeLists.txt
+index cbe5cce..396e013 100644
+--- a/src/extensions/enwiki/CMakeLists.txt
++++ b/src/extensions/enwiki/CMakeLists.txt
+@@ -60,5 +60,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_en DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_en DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_en DESTINATION lib/huggle/extensions)
+ endif()
+Submodule src/extensions/extension-flow contains modified content
+diff --git a/src/extensions/extension-flow/CMakeLists.txt b/src/extensions/extension-flow/CMakeLists.txt
+index 3744d6b..9a7ae91 100644
+--- a/src/extensions/extension-flow/CMakeLists.txt
++++ b/src/extensions/extension-flow/CMakeLists.txt
+@@ -54,6 +54,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_flow DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_flow DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_flow DESTINATION lib/huggle/extensions)
+ endif()
+
+Submodule src/extensions/extension-mass-delete contains modified content
+diff --git a/src/extensions/extension-mass-delete/CMakeLists.txt b/src/extensions/extension-mass-delete/CMakeLists.txt
+index 05fec89..400c28e 100644
+--- a/src/extensions/extension-mass-delete/CMakeLists.txt
++++ b/src/extensions/extension-mass-delete/CMakeLists.txt
+@@ -56,5 +56,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_nuke DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_nuke DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_nuke DESTINATION lib/huggle/extensions)
+ endif()
+Submodule src/extensions/extension-scoring contains modified content
+diff --git a/src/extensions/extension-scoring/CMakeLists.txt b/src/extensions/extension-scoring/CMakeLists.txt
+index f459515..af4a7e9 100644
+--- a/src/extensions/extension-scoring/CMakeLists.txt
++++ b/src/extensions/extension-scoring/CMakeLists.txt
+@@ -76,5 +76,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_scoring DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_scoring DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_scoring DESTINATION lib/huggle/extensions)
+ endif()
+Submodule src/extensions/extension-splitter-helper contains modified content
+diff --git a/src/extensions/extension-splitter-helper/CMakeLists.txt b/src/extensions/extension-splitter-helper/CMakeLists.txt
+index d56f8a5..9fcdf82 100644
+--- a/src/extensions/extension-splitter-helper/CMakeLists.txt
++++ b/src/extensions/extension-splitter-helper/CMakeLists.txt
+@@ -67,5 +67,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_sh DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_sh DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_sh DESTINATION lib/huggle/extensions)
+ endif()
+Submodule src/extensions/extension-thanks contains modified content
+diff --git a/src/extensions/extension-thanks/CMakeLists.txt b/src/extensions/extension-thanks/CMakeLists.txt
+index f4bfa1b..df38ff8 100644
+--- a/src/extensions/extension-thanks/CMakeLists.txt
++++ b/src/extensions/extension-thanks/CMakeLists.txt
+@@ -67,6 +67,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_thanks DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_thanks DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_thanks DESTINATION lib/huggle/extensions)
+ endif()
+
+Submodule src/extensions/mass-delivery contains modified content
+diff --git a/src/extensions/mass-delivery/CMakeLists.txt b/src/extensions/mass-delivery/CMakeLists.txt
+index 29c52fa..bb6a2f4 100644
+--- a/src/extensions/mass-delivery/CMakeLists.txt
++++ b/src/extensions/mass-delivery/CMakeLists.txt
+@@ -75,5 +75,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ if (LINUX_SNAP)
+ INSTALL(TARGETS huggle_md DESTINATION bin/extensions)
+ else()
+- INSTALL(TARGETS huggle_md DESTINATION share/huggle/extensions)
++ INSTALL(TARGETS huggle_md DESTINATION lib/huggle/extensions)
+ endif()
+diff --git a/src/huggle_core/definitions_prod.hpp b/src/huggle_core/definitions_prod.hpp
+index 3e1a4319..8d69cb3b 100644
+--- a/src/huggle_core/definitions_prod.hpp
++++ b/src/huggle_core/definitions_prod.hpp
+@@ -216,7 +216,7 @@ namespace std { typedef decltype(nullptr) nullptr_t; }
+ #define HUGGLE_GLOBAL_EXTENSION_PATH QCoreApplication::applicationDirPath() + "/extensions"
+ #elif defined __linux__
+ #define HUGGLE_UPDATER_PLATFORM_TYPE "linux"
+- #define HUGGLE_GLOBAL_EXTENSION_PATH "/usr/local/share/huggle/extensions"
++ #define HUGGLE_GLOBAL_EXTENSION_PATH "/usr/lib/huggle/extensions"
+ #elif defined HUGGLE_WIN
+ // This is needed by yaml cpp library, otherwise it won't build with MSVC
+ #define YAML_CPP_DLL