source: npl/virt/libvirt/libvirt.SlackBuild

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.5 KB
Line 
1#!/bin/bash
2#Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild
3#Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven.
4#Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden.
5##################################### Build dependency info:
6
7#DEP:libxml2
8#DEP:gnutls
9##DEP:libgcrypt
10#DEP:libyajl
11#DEP:lvm2
12#DEP:libnl
13#DEP:readline
14#DEP:ncurses
15
16#######Essential package info.
17#Change these if autodetection fails.
18
19#Name of the Syn-3 package that we are going to create
20NAME=`basename $0|sed 's/.SlackBuild//'`
21
22#Archive of the sourcefiles to unpack
23SRC_ARC=`ls *.tar.* *.zip 2>/dev/null`
24
25#Version of the sourcefiles
26VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'`
27
28#Architecture that the created binaries run on.
29#Use noarch for scripts.
30ARCH=`uname -m`
31
32#from this point on, exit on errors:
33set -e
34
35########Build and create the pacakge.
36#Uncomment the stuff that you dont want or need
37
38#Unpack source
39#(uncomment if not needed)
40syn3_unpack $SRC_ARC
41
42#Directory where the sourcefiles are unpacked.
43#(you might have to adjust this if autodetection fails)
44SRC_DIR=`ls -c|head -1`
45
46#apply patches
47#patch -p1 -d $SRC_DIR < fluxkiosk.patch || exit 1
48
49pushd $SRC_DIR
50
51#AUTOMAKE: Configure
52#Some usefull stuff you sometimes need to set:
53#export LDFLAGS="-L/usr/X11/lib/ -L/usr/lib/mysql/"
54#export LD_LIBRARY_PATH=/usr/lib/mysql
55#export VPATH=$LD_LIBRARY_PATH
56#export CFLAGS="-std=c89"
57#export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html
58export IPTABLES_PATH="/usr/sbin/iptables"
59MAKE_OPTS=""
60./configure --prefix=/usr --with-yajl || exit 1
61
62#AUTOMAKE: Compile
63make $MAKE_OPTS || exit 1
64
65
66#AUTOMAKE: Install
67mkdir -p /tmp/pkg &>/dev/null
68make pkgconfigdir=/usr/lib/pkgconfig install_prefix=/tmp/pkg DESTDIR=/tmp/pkg INSTALL_ROOT=/tmp/pkg install_root=/tmp/pkg $MAKE_OPTS install || exit 1
69popd
70
71#zit in libvirt_conf
72rm -rf /tmp/pkg/etc
73
74#strip bins and other stuff
75syn3_strip /tmp/pkg || exit 1
76
77#mkdir -p /tmp/pkg/service/libvirtd || exit 1
78#cp run /tmp/pkg/service/libvirtd || exit 1
79#chmod +x /tmp/pkg/service/libvirtd/run
80
81#mkdir -p /tmp/pkg/etc/libvirt/hooks || exit 1
82#cp qemu /tmp/pkg/etc/libvirt/hooks || exit 1
83#chmod +x /tmp/pkg/etc/libvirt/hooks/qemu
84
85#move development stuff and create seperate development package
86syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1
87syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1
88
89#make main package
90syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
91
92
93
Note: See TracBrowser for help on using the repository browser.