summaryrefslogtreecommitdiff
path: root/pkgbuild
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-09 19:01:31 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-09 19:01:31 +0900
commit0b728abc5b3246f348fcf6607c90b751c2b348c5 (patch)
treee1a3ebea6e2f9b3b3f19c4e425e7e01ef8c3ede4 /pkgbuild
parentd128caf9d1db44da49c00e4b4e4a565eb8f5d59f (diff)
Update PKGBUILD to work with release tarballs as well as Git clones
Reviewers: raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D440
Diffstat (limited to 'pkgbuild')
-rw-r--r--pkgbuild/PKGBUILD80
1 files changed, 51 insertions, 29 deletions
diff --git a/pkgbuild/PKGBUILD b/pkgbuild/PKGBUILD
index 6103dd058..3deb62cd4 100644
--- a/pkgbuild/PKGBUILD
+++ b/pkgbuild/PKGBUILD
@@ -1,40 +1,43 @@
1# Maintainer: Enlightenment Developers <enlightenment-devel@enlightenment.org> 1# Maintainer: Enlightenment Developers <enlightenment-devel@enlightenment.org>
2pkgname=elementary-git 2pkgname=('elementary' 'elementary_test' 'elementary_doc')
3_pkgname=${pkgname%-*} 3[[ -d ../.git ]] && pkgname=('elementary-git' 'elementary_test-git' 'elementary_doc-git')
4true && pkgname=('elementary-git' 'elementary_test-git' 'elementary_doc-git')
5pkgver=1.8.99.8967.a1cfce6 4pkgver=1.8.99.8967.a1cfce6
6pkgrel=1 5pkgrel=1
7pkgdesc="Enlightenment GUI toolkit - GIT development snapshot" 6pkgdesc="Enlightenment GUI toolkit - GIT development snapshot"
8arch=('i686' 'x86_64' 'arm') 7arch=('i686' 'x86_64' 'arm')
9url="http://www.enlightenment.org" 8url="http://www.enlightenment.org"
10license=('LGPL2.1' 'CCPL:cc-by-sa') 9license=('LGPL2.1' 'CCPL:cc-by-sa')
11makedepends=('doxygen' 'imagemagick' 'git') 10makedepends=('doxygen' 'imagemagick')
12depends=('efl-git') 11[[ -d ../.git ]] && makedepends+=('git')
13 [[ ! $(pacman -T ewebkit-svn) ]] && depends+=('ewebkit-svn') # webkit-efl support is detected at build time 12depends=('efl')
13 [[ ! $(pacman -T ewebkit) ]] && depends+=('ewebkit') # webkit-efl support is detected at build time
14 [[ ! $(pacman -T elocation-git) ]] && depends+=('elocation-git') # elocation support is detected at build time 14 [[ ! $(pacman -T elocation-git) ]] && depends+=('elocation-git') # elocation support is detected at build time
15 [[ ! $(pacman -T libeweather-git) ]] && depends+=('libeweather-git') # eweather support is detected at build time 15 [[ ! $(pacman -T libeweather-git) ]] && depends+=('libeweather-git') # eweather support is detected at build time
16optdepends=('emotion_generic_players' 'evas_generic_loaders') 16optdepends=('emotion_generic_players' 'evas_generic_loaders')
17options=('!libtool' 'debug') 17options=('debug')
18provides=('elementary')
19 18
20pkgver() { 19pkgver() {
21 cd "../.." 20 cd "../.."
22 21
23 for _i in v_maj v_min v_mic; do 22 if [[ -d .git ]]; then
24 local v_ver=$v_ver.$(grep -m 1 $_i configure.ac | sed 's/m4//' | grep -o "[[:digit:]]*") 23 for _i in v_maj v_min v_mic; do
25 done 24 local v_ver=$v_ver.$(grep -m1 $_i configure.ac | sed 's/m4//' | grep -o "[[:digit:]]*")
25 done
26 26
27 v_ver=$(awk -F , -v v_ver=${v_ver#.} '/^AC_INIT/ {gsub(/v_ver/, v_ver); gsub(/[\[\] -]/, ""); print $2}' configure.ac) 27 v_ver=$(awk -F , -v v_ver=${v_ver#.} '/^AC_INIT/ {gsub(/v_ver/, v_ver); gsub(/[\[\] -]/, ""); print $2}' configure.ac)
28 28
29 printf "$v_ver.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" 29 printf "$v_ver.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
30 else
31 ./configure --version | awk '/^elementary/ {gsub("-", ""); print $NF}'
32 fi
30} 33}
31 34
32build() { 35build() {
33 cd "../.." 36 cd "../.."
34 export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer" 37 export CFLAGS="$CFLAGS -fvisibility=hidden -fomit-frame-pointer"
35 [[ -e Makefile ]] && make clean distclean 38 [[ -e Makefile ]] && make clean distclean
36 ./configure --prefix=/usr \ 39 [[ -e autogen.sh ]] && _configure=autogen.sh || _configure=configure
37 --disable-static 40 ./$_configure --prefix=/usr --disable-static
38 make 41 make
39 make doc 42 make doc
40} 43}
@@ -44,27 +47,34 @@ build() {
44# make -k check 47# make -k check
45#} 48#}
46 49
47package_elementary-git() { 50package_elementary() {
48 cd "../.." 51 cd "../.."
49 make -j1 DESTDIR="$pkgdir/" install 52 make -j1 DESTDIR="$pkgdir/" install
50 install -Dm644 README "$pkgdir/usr/share/$pkgname/README" 53 install -Dm644 README "$pkgdir/usr/share/doc/${pkgname%-git}/README"
51 install -Dm644 NEWS "$pkgdir/usr/share/$pkgname/NEWS" 54 install -Dm644 NEWS "$pkgdir/usr/share/doc/${pkgname%-git}/NEWS"
52 install -Dm644 ChangeLog "$pkgdir/usr/share/$pkgname/ChangeLog" 55 install -Dm644 ChangeLog "$pkgdir/usr/share/doc/${pkgname%-git}/ChangeLog"
53 install -Dm644 AUTHORS "$pkgdir/usr/share/$pkgname/AUTHORS" 56 install -Dm644 AUTHORS "$pkgdir/usr/share/doc/${pkgname%-git}/AUTHORS"
54 install -Dm644 COMPLIANCE "$pkgdir/usr/share/$pkgname/COMPLIANCE" 57 install -Dm644 COMPLIANCE "$pkgdir/usr/share/doc/${pkgname%-git}/COMPLIANCE"
55 install -Dm644 COPYING.images "$pkgdir/usr/share/licenses/$pkgname/COPYING.images" 58 install -Dm644 COPYING.images "$pkgdir/usr/share/licenses/$pkgname/COPYING.images"
56 sed -n '1,/details./p' COPYING > "$pkgdir/usr/share/licenses/$pkgname/COPYING" 59 sed -n '1,/details./p' COPYING > "$pkgdir/usr/share/licenses/$pkgname/COPYING"
57 ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/$pkgname/COPYING" 60 ln -s "../licenses/$pkgname/COPYING" "$pkgdir/usr/share/doc/${pkgname%-git}/COPYING"
58 ln -s "../licenses/$pkgname/COPYING.images" "$pkgdir/usr/share/$pkgname/COPYING.images" 61 ln -s "../licenses/$pkgname/COPYING.images" "$pkgdir/usr/share/doc/${pkgname%-git}/COPYING.images"
59 rm -rf "$pkgdir/usr/bin/"elementary_test 62 rm -rf "$pkgdir/usr/bin/"elementary_test
60 rm -rf "$pkgdir/usr/lib/elementary/modules/"{test_entry,test_map} 63 rm -rf "$pkgdir/usr/lib/elementary/modules/"{test_entry,test_map}
61 rm -rf "$pkgdir/usr/share/applications/elementary_test.desktop" 64 rm -rf "$pkgdir/usr/share/applications/elementary_test.desktop"
62 rm -rf "$pkgdir/usr/share/elementary/"{examples,images,objects} 65 rm -rf "$pkgdir/usr/share/elementary/"{examples,images,objects}
63} 66}
64 67
65package_elementary_test-git() { 68package_elementary-git() {
69 provides=("elementary=$pkgver")
70 conflicts=('elementary')
71 package_elementary
72}
73
74package_elementary_test() {
66 pkgdesc="Test application for Elementary" 75 pkgdesc="Test application for Elementary"
67 depends=('elementary') 76 depends=(${pkgname/_test/})
77 unset optdepends
68 78
69 cd "../.." 79 cd "../.."
70 make -j1 DESTDIR="$pkgdir/" install 80 make -j1 DESTDIR="$pkgdir/" install
@@ -77,13 +87,25 @@ package_elementary_test-git() {
77 rm -rf "$pkgdir/usr/share/"{icons,locale} 87 rm -rf "$pkgdir/usr/share/"{icons,locale}
78} 88}
79 89
80package_elementary_doc-git() { 90package_elementary_test-git() {
91 provides=("elementary_test=$pkgver")
92 conflicts=('elementary_test')
93 package_elementary_test
94}
95
96package_elementary_doc() {
81 pkgdesc="Documentation for Elementary" 97 pkgdesc="Documentation for Elementary"
82 arch=('any') 98 arch=('any')
83 unset depends optdepends 99 unset depends optdepends
84 100
85 cd "../.." 101 cd "../.."
86 mkdir -p "$pkgdir/usr/share/doc/$pkgname" 102 mkdir -p "$pkgdir/usr/share/doc/${pkgname%-git}"
87 cp -a doc/html "$pkgdir/usr/share/doc/$pkgname/html" 103 cp -a doc/html "$pkgdir/usr/share/doc/${pkgname%-git}/html"
88 cp -a doc/latex "$pkgdir/usr/share/doc/$pkgname/latex" 104 cp -a doc/latex "$pkgdir/usr/share/doc/${pkgname%-git}/latex"
105}
106
107package_elementary_doc-git() {
108 package_elementary_doc
109 provides=("elementary_doc=$pkgver")
110 conflicts=('elementary_doc')
89} 111}