summaryrefslogtreecommitdiff
path: root/fpc-docs-svn
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-03-01 18:53:25 +0100
committerErich Eckner <git@eckner.net>2022-03-01 18:53:35 +0100
commitd72ba9202e20dba662ebdcbea4834dc8004af004 (patch)
tree0e45eb2a92a4f7fb411d8e0b42ddf4170bdca6d6 /fpc-docs-svn
parentee1f6aaa426ca69a9b5b2ffa73a47218aa3f3cce (diff)
downloadarchlinuxewe-d72ba9202e20dba662ebdcbea4834dc8004af004.tar.xz
fpc-docs-svn: 3.3.1.r1871-1 -> 2.6.0.r1075.30816b44-1
Diffstat (limited to 'fpc-docs-svn')
-rw-r--r--fpc-docs-svn/.gitignore2
-rw-r--r--fpc-docs-svn/PKGBUILD40
2 files changed, 25 insertions, 17 deletions
diff --git a/fpc-docs-svn/.gitignore b/fpc-docs-svn/.gitignore
index 2336bf145..dfcaa10d3 100644
--- a/fpc-docs-svn/.gitignore
+++ b/fpc-docs-svn/.gitignore
@@ -1 +1 @@
-fpcdocs
+documentation
diff --git a/fpc-docs-svn/PKGBUILD b/fpc-docs-svn/PKGBUILD
index 785f642f2..8016914c1 100644
--- a/fpc-docs-svn/PKGBUILD
+++ b/fpc-docs-svn/PKGBUILD
@@ -9,9 +9,9 @@
# See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc
pkgname='fpc-docs-svn'
-pkgver=3.3.1.r1871
+pkgver=2.6.0.r1075.30816b44
_pkgver="${pkgver%.r*}"
-_revision="${pkgver##*.r}"
+_commit="${pkgver##*.}"
pkgrel=1
arch=('any')
url='http://www.freepascal.org/'
@@ -21,34 +21,42 @@ options=('!strip')
makedepends=('subversion'
'texlive-core' 'texlive-htmlxml'
'texlive-latexextra' 'ghostscript' 'fpc-src-svn' 'fpc-svn')
-source=('fpcdocs::svn+http://svn.freepascal.org/svn/fpcdocs/trunk#revision='"${_revision}")
+source=('git+https://gitlab.com/freepascal.org/fpc/documentation.git#commit='"${_commit}")
sha512sums=('SKIP')
pkgver() {
- cd "${srcdir}"/fpcdocs
- _src_ver=$(pacman -Q fpc-src-svn 2>/dev/null) \
- || _src_ver=$(
- pacman -Ss fpc-src-svn \
+ cd "${srcdir}"/documentation
+ last_version=$(
+ git tag \
| sed '
- s@^\S\+/\(fpc-src-svn\s\+\)@\1@
+ s@^release_\([0-9_]\+\)$@\1@
t
d
- '
+ ' \
+ | tr '_' '.' \
+ | sort -V \
+ | tail -n1
)
- _src_ver="${_src_ver##* }"
- _src_ver="${_src_ver%.r*}"
- printf '%s.r%s' \
- "${_src_ver}" \
- $(svnversion | tr -d [A-z])
+ _commit=$(
+ git rev-parse "${_commit}" \
+ | cut -c1-8
+ )
+ revision=$(
+ git rev-list --count "${_commit}" "^release_${last_version//./_}"
+ )
+ printf '%s.r%s.%s' \
+ "${last_version}" \
+ "${revision}" \
+ "${_commit}"
}
build() {
- cd "${srcdir}"/fpcdocs
+ cd "${srcdir}"/documentation
cp -r /usr/lib/fpc/src ../fpcsrc
make -j1 FPCSRCDIR="${srcdir}"/fpcsrc html
}
package() {
- cd "${srcdir}"/fpcdocs
+ cd "${srcdir}"/documentation
make PREFIX="${pkgdir}"/usr htmlinstall
}