upgpkg: ocaml-topkg 1.0.5-2
[arch-packages.git] / tidy / trunk / PKGBUILD
blobb9de89569782811f64a35080f589b1f6d050ee43
1 # Maintainer:
2 # Contributor: eric <eric@archlinux.org>
3 # Contributor: Markus Meissner <markus@meissna.de>
5 pkgname=tidy
6 pkgver=5.8.0
7 _commit=9f8d957e4d9c164b0aea10a36c7933d67517abb1
8 pkgrel=2
9 pkgdesc="A tool to tidy down your HTML code to a clean style"
10 arch=(x86_64)
11 url="https://www.html-tidy.org/"
12 license=(custom)
13 depends=(glibc)
14 makedepends=(cmake libxslt)
15 conflicts=(tidyhtml)
16 provides=(tidyhtml)
17 replaces=(tidyhtml)
18 source=("$pkgname-$_commit.tar.gz::https://github.com/htacg/tidy-html5/archive/$_commit.tar.gz")
19 sha512sums=('085da1bc97ab20a65d1104bd13e39ba7eb7a51407553e9237e8efda0a2c3b6efcb2e957a670731482ac17b639f12fe59a1f52740e82d4367410fe41e62afc8a2')
21 prepare() {
22   mv tidy-html5-{$_commit,$pkgver}
23   mkdir -p build
26 build() {
27   cd build
28   export CFLAGS+=" -ffat-lto-objects"
29   export CXXFLAGS+=" -ffat-lto-objects"
30   cmake ../tidy-html5-$pkgver \
31     -DCMAKE_INSTALL_PREFIX=/usr \
32     -DCMAKE_BUILD_TYPE=Release
33   make
36 package() {
37   cd build
38   make DESTDIR="$pkgdir" install
40 # Compatibility symlinks until everything is ported
41   ln -s tidybuffio.h "$pkgdir"/usr/include/buffio.h
42   ln -s tidyplatform.h "$pkgdir"/usr/include/platform.h
44   install -Dm644 "$srcdir"/$pkgname-html5-$pkgver/README/LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE