desktop/gmock/PKGBUILD
2013-12-17 18:41:12 +00:00

53 lines
1.8 KiB
Bash

# Desktop Packages for Chakra, part of chakra-project.org
# Maintainer abveritas@chakra-project.org
# contributor Xiao-Long Chen <chenxiaolong@cxl.epac.to>
pkgname=gmock
pkgver=1.6.0
_ubuntu_ver=0ubuntu1
pkgrel=1
pkgdesc="Google Mock - A library for writing and using C++ mock classes"
arch=('x86_64')
url="http://code.google.com/p/googlemock/"
license=('BSD')
depends=('python2' 'gtest')
options=("!libtool")
source=("http://googlemock.googlecode.com/files/${pkgname}-${pkgver}.zip"
"http://archive.ubuntu.com/ubuntu/pool/universe/g/google-mock/google-mock_${pkgver}-${_ubuntu_ver}.debian.tar.gz")
md5sums=('f547f47321ca88d3965ca2efdcc2a3c1'
'9cabe826b8065a18de963e7a6ab6e46b')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
for i in $(cat "${srcdir}/debian/patches/series" | grep -v '#'); do
patch -Np1 -i "${srcdir}/debian/patches/${i}"
done
find -name \*.py -exec sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python2/' {} \;
./configure --prefix=/usr --enable-external-gtest
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" install
mkdir -p "${pkgdir}/usr/share/licenses/gmock/"
cp "${srcdir}/${pkgname}-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/"
install -d -m755 "${pkgdir}/usr/bin/"
install -d -m755 "${pkgdir}/usr/share/${pkgname}/"
install -d -m755 "${pkgdir}/usr/share/doc/${pkgname}/"
install -m755 "scripts/generator/gmock_gen.py" "${pkgdir}/usr/bin/"
cp -r --preserve=mode,links "scripts/generator/cpp" "${pkgdir}/usr/share/${pkgname}/"
for i in README CONTRIBUTORS; do
install -m644 ${i} "${pkgdir}/usr/share/doc/${pkgname}/"
done
for f in $(ls "${pkgdir}"/usr/bin/*.py); do mv ${f} $(echo ${f} | sed s/\.py//); done
rm -f "${pkgdir}"/usr/lib/libgtest*
rm -rf "${pkgdir}"/usr/include/gtest*
}
# vim:set ts=2 sw=2 et: