summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtomicFS2024-05-04 23:08:15 +0200
committerAtomicFS2024-05-04 23:08:15 +0200
commit063aa30b15a6a7ffbae99813ffb50f75fab61160 (patch)
treecde8c525a2c78f3f8ed1b4c773df42f1d2edd3ac
parentd93093669919e1e4c61987d2e6c6cae293013942 (diff)
downloadaur-063aa30b15a6a7ffbae99813ffb50f75fab61160.tar.gz
tweak rust compilation
Signed-off-by: AtomicFS <vojtech_vesely@white-hat-hacker.icu>
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD47
2 files changed, 37 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 86066da46d2c..b3e842387353 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -4,9 +4,10 @@ pkgbase = mdbook-rss-git
pkgrel = 2
url = https://gitlab.com/albalitz/mdbook-rss
arch = x86_64
- license = MPL
- makedepends = rust
+ license = MPL-2.0
makedepends = cargo
+ provides = mdbook-rss
+ conflicts = mdbook-rss
source = git+https://gitlab.com/albalitz/mdbook-rss.git
source = mdbook-rss.patch
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 123d3dcb3812..ecc5f94c227c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: atomicfs
+# Maintainer: atomicfs <https://aur.archlinux.org/account/atomicfs>
pkgname=mdbook-rss-git
_pkgname=mdbook-rss
@@ -6,13 +6,21 @@ pkgver=8.dc948c6
pkgrel=2
pkgdesc="A preprocessor for mdbook to generate an RSS feed from your chapters"
url="https://gitlab.com/albalitz/mdbook-rss"
-arch=(x86_64)
-license=(MPL)
-makedepends=(rust cargo)
-source=("git+${url}.git"
- 'mdbook-rss.patch')
-sha256sums=('SKIP'
- 'b644bfb8e6b1efb5f0f2bb314b629d7c2079503b2677a9130ee1a116134077a2')
+arch=('x86_64')
+license=('MPL-2.0')
+makedepends=(
+ 'cargo'
+)
+source=(
+ "git+${url}.git"
+ 'mdbook-rss.patch'
+)
+sha256sums=(
+ 'SKIP'
+ 'b644bfb8e6b1efb5f0f2bb314b629d7c2079503b2677a9130ee1a116134077a2'
+)
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
# https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver()_function
pkgver() {
@@ -22,16 +30,29 @@ pkgver() {
}
prepare() {
- patch --directory="$_pkgname" --forward --strip=1 --input="${srcdir}/mdbook-rss.patch"
+ cd "${srcdir}/${_pkgname}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+ patch --forward --strip=1 --input="${srcdir}/mdbook-rss.patch"
+}
+
+check() {
+ cd "${srcdir}/${_pkgname}"
+ export RUSTUP_TOOLCHAIN=stable
+ #cargo test --frozen --all-features
+ cargo test --all-features
}
build() {
- cd "${_pkgname}"
- cargo build --release
+ cd "${srcdir}/${_pkgname}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ #cargo build --frozen --release --all-features
+ cargo build --release --all-features
}
package() {
- cd "${_pkgname}"
- install -Dm 755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+ cd "${srcdir}/${_pkgname}"
+ install -Dm 755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}