Skip to content

Commit 2220cf3

Browse files
committed
initial commit
0 parents  commit 2220cf3

6 files changed

Lines changed: 126 additions & 0 deletions

File tree

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
.git*
3+
Makefile
4+
xapian*
5+
src/
6+
pkg/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
pkg/
3+
src/
4+
xapian*

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
FROM base/archlinux
3+
4+
MAINTAINER Markus Blöchl <blochl@in.tum.de>
5+
6+
ENV ARCH_DATE 04.10.2015
7+
8+
RUN pacman -Sy && \
9+
pacman-db-upgrade && \
10+
pacman -S archlinux-keyring --noconfirm --force && \
11+
pacman -Syu --noconfirm --force && \
12+
pacman-db-upgrade
13+
14+
RUN pacman -S --noconfirm --needed --force \
15+
base-devel \
16+
git \
17+
zlib \
18+
libutil-linux \
19+
help2man \
20+
graphviz \
21+
perl \
22+
tcl \
23+
lua \
24+
python \
25+
python-docutils \
26+
python-sphinx
27+
28+
RUN useradd -M -N packager
29+
30+
VOLUME /data
31+
WORKDIR /data
32+
33+
CMD ["bash" "-l"]

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
IMG_NAME=ususdei/archbuild
3+
DATA=${PWD}
4+
CMD=su packager makepkg
5+
6+
7+
all: image
8+
docker run --rm -it --volume=${DATA}:/data ${IMG_NAME} ${CMD}
9+
10+
shell: image
11+
docker run --rm -it --volume=${DATA}:/data ${IMG_NAME} bash -l
12+
13+
image:
14+
docker build -t ${IMG_NAME} .
15+

PKGBUILD

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
# Maintainer: Markus Blöchl <bloechl@in.tum.de>
3+
_name=xapian-python3
4+
pkgname=$_name-git
5+
pkgver=git
6+
pkgrel=1
7+
pkgdesc="Open source search engine library with python3 and lua bindings"
8+
arch=('x86_64')
9+
url="http://www.xapian.org"
10+
license=('GPL')
11+
groups=()
12+
depends=('lua' 'python>=3.5')
13+
makedepends=('git' 'zlib' 'libutil-linux' 'help2man' 'graphviz' 'perl' 'tcl' 'python-docutils' 'python-sphinx')
14+
provides=("$_name" xapian-core)
15+
conflicts=("$_name" xapian-core)
16+
replaces=()
17+
backup=()
18+
options=()
19+
install=
20+
source=("$_name::git+https://github.com/xapian/xapian")
21+
noextract=()
22+
md5sums=('SKIP')
23+
24+
25+
pkgver() {
26+
cd "$srcdir/$_name"
27+
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
28+
}
29+
30+
prepare() {
31+
cd "$srcdir/$_name"
32+
local py_minor=$(python3 -c 'import sys;print(sys.version_info.minor)')
33+
if [ "$py_minor" -ge 5 ]; then
34+
sed -i -e "s/'module' object has no attribute/module 'xapian' has no attribute/" xapian-bindings/python3/smoketest.py
35+
sed -i -e 's/.pyo/.opt-1.pyc/g' xapian-bindings/python3/Makefile.am
36+
fi
37+
}
38+
39+
build() {
40+
cd "$srcdir/$_name"
41+
touch xapian-letor/.nobootstrap
42+
touch xapian-applications/omega/.nobootstrap
43+
./bootstrap
44+
./configure --prefix=/usr --with-python3 --with-lua
45+
make all
46+
}
47+
48+
check() {
49+
cd "$srcdir/$_name"
50+
make -k check
51+
}
52+
53+
package() {
54+
cd "$srcdir/$_name"
55+
#cp xapian-bindings/python3/xapian/__pycache__/__init__.cpython-35.{opt-1.pyc,pyo}
56+
make DESTDIR="$pkgdir/" install
57+
#mv $pkgdir/usr/lib/python3.5/site-packages/xapian/__init__.cpython-35.{pyo,opt-1.pyc}
58+
}
59+

README.TXT

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
This repo allowes one to build xapian with python3 and lua bindings from git for arch linux in a standard environment.
3+
4+
`$ make` will fire up a docker container running arch linux and build xapian from source.
5+
The result will appear in the current directory.
6+
7+
Of course you can also just use the PKGBUILD alone.
8+
9+
I only tested it with xapian 1.3.3 and python 3.5 for now.

0 commit comments

Comments
 (0)