summaryrefslogtreecommitdiff
path: root/libre/python2-cssmin-fredj/PKGBUILD
blob: 25b4a6f964f5734c1341fbf487196d63f02ebe69 (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
# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

_pkgname=python2-cssmin
pkgname=python2-cssmin-fredj
pkgver=0.1.4.git4 # 0.1.4.git<number of commits after 0.1.4>
_gitver='commit=3422b9962c5a6c2adb9597f418131d73e991c9b6'

pkgdesc="A Python port of the YUI CSS compression algorithm"
license=('custom:MIT' 'custom:BSD3')
url="https://github.com/fredj/cssmin"

provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")

pkgrel=3
arch=(any)

makedepends=('python2-distribute')
source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz")
md5sums=('7f073512e29cdcfef335156f343206e5')

mkmakedepends=('git')
mksource=("$pkgname-$pkgver::git://github.com/fredj/cssmin.git#${_gitver}")
mkmd5sums=('SKIP')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's|#!/usr/bin/env python\s*$|#!/usr/bin/env python2|' setup.py src/cssmin.py
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  ./setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}