1 # Maintainer: Lucky <archlinux@builds.lucky.li>
2 # Based on libtorrent [community]
5 _pkgname="${pkgname%-*}"
8 pkgdesc="BitTorrent library written in C++"
9 url="http://libtorrent.rakshasa.no"
11 arch=("i686" "x86_64")
12 depends=("libsigc++" "openssl")
13 makedepends=("cppunit" "git")
15 conflicts=("${_pkgname}")
16 provides=("${_pkgname}")
21 _gitname="${_pkgname}"
22 _gitroot="git://github.com/rakshasa/${_pkgname}.git"
23 _gitoptions="--depth 1"
29 msg "Connecting to GIT server..."
30 if [ -d "${_gitname}/.git" ]; then
31 (cd "${_gitname}" && git pull origin)
32 msg "The local repository was updated."
34 (git clone ${_gitoptions} ${_gitroot} ${_gitname})
35 msg "The remote repository was cloned."
37 msg "GIT sync done or server timeout."
41 if [ -e ".githash_${CARCH}" ]; then
42 _githash="$(cat ".githash_${CARCH}")"
47 if [ "${_githash}" == "$(git show | grep -m 1 commit | sed "s/commit //")" ];then
48 msg "GIT hash is the same as previous build."
51 echo "$(git show | grep -m 1 commit | sed "s/commit //")" > "${srcdir}/.githash_${CARCH}"
55 msg "Creating build directory."
56 [ -d "${_gitname}-build" ] && rm -rf "${_gitname}-build"
57 cp -a "${_gitname}" "${_gitname}-build"
58 msg "Starting make..."
59 cd "${_gitname}-build"
63 # export LIBS="${LIBS} -lpthread"
64 export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
65 ./configure --prefix=/usr --disable-debug
71 cd "${srcdir}/${_pkgname}-build"
73 make DESTDIR="${pkgdir}" install