blob: 56ee7e4fc88e9e13cfad4ee5737f1eff83091e80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Maintainer: Giovanni Harting <539@idlegandalf.com>
pkgname=thumbor
pkgver=7.7.4
pkgrel=1
pkgdesc='open-source photo thumbnail service'
arch=(x86_64)
url='https://github.com/thumbor/thumbor'
license=(MIT)
depends=(
python
python-colorama
python-pycurl
python-opencv
python-cairosvg
python-tornado
gifsicle
python-libthumbor
python-derpconf
python-socketfromfd
python-piexif
python-jpegiptc
)
makedepends=(python-setuptools)
checkdepends=(python-pytest python-preggy python-pyssim)
backup=('etc/thumbor.conf')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
'thumbor.service')
b2sums=('5c663f37888bdd9d9002eb3f6b8f7fffb8593b138058174887fef0bd1883a14fa1455ba28b9c4e2814171e7aeb0f946c14fb01283fc1fdcbe174d48ba7a37279'
'9f5b837710e47654d522c5791cb5c6e01d6452093837a0c57b7158cbc8be6a7a3b5380efe2e975d6396bc1fd23a5f922f6ede9aa921142fd004ff48381f58db3')
prepare() {
cd $pkgname-$pkgver
# adjust storage/cache paths to match systemd service
sed -e "s|FILE_STORAGE_ROOT_PATH = join(home, 'thumbor', 'storage' )|FILE_STORAGE_ROOT_PATH = '/var/lib/thumbor'|" \
-e "s|RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = join(home, 'thumbor', 'result_storage')|RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/var/cache/thumbor'|" \
-i $pkgname/$pkgname.conf
}
# skip tests for now, they are utterly broken and require sentry.io sdk
#check(){
# cd "$pkgname-$pkgver"
# pytest
#}
build() {
cd $pkgname-$pkgver
python setup.py build
}
package() {
install -Dm644 $pkgname-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm 644 thumbor.service -t "$pkgdir"/usr/lib/systemd/system/
install -Dm 644 $pkgname-$pkgver/$pkgname/$pkgname.conf -t "$pkgdir"/etc/
cd $pkgname-$pkgver
python setup.py install --root="$pkgdir" --optimize=1
}
# vim:set ts=2 sw=2 et:
|