-
-
Save lmartinez-mirror/52cc3ecd78ef72403d1d9cbba9fdf32e to your computer and use it in GitHub Desktop.
package cleanup for sioyek
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index d70cb87..18fe2d8 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -1,40 +1,42 @@ | |
# Maintainer: Alexander Seiler <seileralex@gmail.com> | |
pkgname=sioyek | |
pkgver=1.4.0 | |
-pkgrel=1 | |
+pkgrel=2 | |
pkgdesc="PDF viewer for research papers and technical books." | |
arch=('x86_64') | |
license=('GPL3') | |
-provides=('sioyek') | |
url="https://github.com/ahrm/sioyek" | |
-depends=('qt5-base' 'qt5-3d' 'harfbuzz' 'gzip' 'libmupdf' 'zlib' 'gumbo-parser' 'openjpeg2' 'jbig2dec') | |
+depends=( | |
+ 'gumbo-parser' | |
+ 'harfbuzz' | |
+ 'jbig2dec' | |
+ 'libmupdf' | |
+ 'openjpeg2' | |
+ 'qt5-3d' | |
+ 'qt5-base' | |
+ 'zlib') | |
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" "mupdf-1.20.patch") | |
sha256sums=('44d49aec28e49bb79c2d0fb7cefd26aecc53b60136bf02dfec9863ac586aacd0' 'ab9fdffca70d43f1e6d2ba347c546430a79c51452178f05efb086589e247054b') | |
prepare() { | |
- cd "$pkgname-$pkgver" | |
- patch --forward --strip=1 --input="${srcdir}/mupdf-1.20.patch" | |
- sed -i 's/-lmupdf-third -lmupdf-threads -lharfbuzz/-lmupdf-third -lharfbuzz -lfreetype -lgumbo -ljbig2dec -lopenjp2 -ljpeg/' pdf_viewer_build_config.pro | |
- sed -i 's/\/\/#define LINUX_STANDARD_PATHS/#define LINUX_STANDARD_PATHS/' pdf_viewer/main.cpp | |
+ cd "$pkgname-$pkgver" | |
+ patch --forward --strip=1 --input="${srcdir}/mupdf-1.20.patch" | |
+ sed -i 's/-lmupdf-threads/-lfreetype -lgumbo -ljbig2dec -lopenjp2 -ljpeg/' pdf_viewer_build_config.pro | |
+ sed -i '/#define LINUX_STANDARD_PATHS/s/\/\///' pdf_viewer/main.cpp | |
} | |
build() { | |
- cd "$pkgname-$pkgver" | |
- ./build_linux.sh | |
+ cd "$pkgname-$pkgver" | |
+ ./build_linux.sh | |
} | |
package() { | |
- cd "$pkgname-$pkgver" | |
- install -Dm755 ./build/sioyek "$pkgdir/usr/bin/sioyek" | |
- install -Dm755 ./LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
- install -Dm644 ./resources/sioyek-icon-linux.png "$pkgdir/usr/share/icons/$pkgname-icon-linux.png" | |
- install -Dm644 ./resources/$pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" | |
- mkdir -p "$pkgdir/usr/share/sioyek" | |
- install -Dm644 -t "$pkgdir/usr/share/sioyek" build/tutorial.pdf | |
- cp -r build/shaders "$pkgdir/usr/share/sioyek" | |
- mkdir -p "$pkgdir/etc/sioyek" | |
- install -Dm644 -t "$pkgdir/etc/sioyek" build/keys.config build/prefs.config | |
- mkdir -p "$pkgdir/usr/share/man/man1" | |
- install -Dm644 -t "$pkgdir/usr/share/man/man1" resources/sioyek.1 | |
- gzip "$pkgdir/usr/share/man/man1/sioyek.1" | |
+ cd "$pkgname-$pkgver" | |
+ install -D build/sioyek -t "$pkgdir/usr/bin/" | |
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" | |
+ install -Dm644 resources/sioyek-icon-linux.png -t "$pkgdir/usr/share/icons/" | |
+ install -Dm644 resources/$pkgname.desktop -t "$pkgdir/usr/share/applications/" | |
+ install -Dm644 build/shaders/* -t "$pkgdir/usr/share/$pkgname/shaders/" | |
+ install -Dm644 -t "$pkgdir/etc/sioyek/" build/keys.config build/prefs.config | |
+ install -Dm644 -t "$pkgdir/usr/share/man/man1" resources/sioyek.1 | |
} |
Each package provides itself by default; it's not necessary to add provides=('$pkgname')
. You'd only use it for different variations of the same package. For example, if you upload a sioyek-bin
package to the AUR, you'd have to add provides=('sioyek')
to denote that it provides the same functionality as sioyek
proper.
Thanks.
I think we should keep the line
install -Dm644 -t "$pkgdir/usr/share/sioyek" build/tutorial.pdf
because after starting the application from a fresh install it tries to open that tutorial.pdf
and if it is not available, an error message will be shown. Do you agree?
If it's required for runtime, then sure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
Why is the line
not needed?
Or when is it useful to have a
provides=
?