blob: d1a8a8b381fef98fc61e3a1a721d1235b33a978f (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Maintainer: CubeTheThird <cubethethird@gmail.com>
pkgname=e4rat-lite-git
_gitname=e4rat-lite
pkgdesc="An improved version of e4rat, a toolset to accelerate the boot process and application startups."
url=https://github.com/LendyZhang/$_gitname
pkgver=2.7.r90.ebf7d86
pkgrel=2
arch=(i686 x86_64)
license=('GPL3')
depends=('e2fsprogs>=1.41' 'gettext>=0.18' 'boost-libs>=1.41' 'audit>=0.1.7')
makedepends=('git' 'cmake>=2.6' 'boost' 'perl')
optdepends=('bootchart2: A "startup" graphing tool')
conflicts=('ureadahead' 'e4rat-preload-lite' 'e4rat-preload-lite-git' 'e4rat-lite')
source=("git+https://github.com/LendyZhang/$_gitname.git"
"$pkgname.install"
"e4rat-lite-git-update.hook"
"addSyscall.patch")
md5sums=('SKIP'
'e0deb0fc92359da3a1970bbab467ffdf'
'b889cd20982a0d95fb694719174f5a11'
'ec21f5d9b665a5da41db6c2eb4c8ef46')
install=$pkgname.install
backup=('etc/e4rat-lite.conf')
pkgver() {
cd "$srcdir"/$_gitname
printf "2.7.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
#Apply patch to addSyscall function
patch --directory="$_gitname" --forward --strip=2 --input="$srcdir/addSyscall.patch"
cd "$srcdir"
#Edit the cmd to automatically re-build the package
cmd="echo 'NOTICE: Boost has been updated. Please re-build $pkgname.'"
sed -i "/Exec=/ s/$/$cmd/" 'e4rat-lite-git-update.hook'
if [ -d "build" ]; then
rm -rf build/*
else
mkdir build
fi
cd "$srcdir"/$_gitname
}
build() {
cd "$srcdir"/build
cmake "$srcdir"/$_gitname -DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_PREFIX="/usr"
make
rm -rf "$srcdir"/$_gitname/lib${pkgname}-core.a
}
package() {
cd "$srcdir/build"
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir/usr/share/doc/${pkgname}/"
mkdir -p "$pkgdir/usr/share/license/${pkgname}/"
install -m644 "$srcdir"/$_gitname/README* "$pkgdir"/usr/share/doc/${pkgname}/
install -m644 "$srcdir"/$_gitname/LICENSE* "$pkgdir"/usr/share/license/${pkgname}/
install -vDm644 "$srcdir"/e4rat-lite-git-update.hook "$pkgdir"/usr/share/libalpm/hooks/e4rat-lite-git-update.hook
}
|