-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPKGBUILD
68 lines (64 loc) · 1.37 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Pavlo Hilei <[email protected]>
pkgname=ucutag-git
pkgver=1.0
pkgrel=1
epoch=
pkgdesc="This is fuse based tag-oriented filesystem that uses MongoDB as backend"
arch=(x86_64)
url="https://github.com/yewhenp/UCUTag.git"
license=('GPL3')
groups=()
depends=(fuse2)
makedepends=(git 'cmake>=3.15''boost>=1.75' gcc)
checkdepends=()
optdepends=()
provides=(ucutag)
conflicts=()
replaces=()
backup=()
options=(!buildflags)
install=
changelog=
source=("git+$url")
noextract=()
md5sums=('SKIP')
validpgpkeys=()
pkgver() {
cd UCUTag
printf "1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
if [ ! -d "mongo-cxx-driver" ]; then
git clone https://aur.archlinux.org/mongo-cxx-driver.git
fi
cd mongo-cxx-driver
makepkg -si
cd ..
if [ ! -d "mongodb-bin" ]; then
git clone https://aur.archlinux.org/mongodb-bin.git
fi
cd mongodb-bin
makepkg -si
cd ../UCUTag
if [ -d build ]; then
rm -rf build
fi
# bash compile.sh
mkdir -p build
(
cd build
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=${1-Release} -S ..
make -j4 X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 VERBOSE=1
)
}
package() {
cd UCUTag
echo "Copying project to /opt/$pkgname"
sudo mkdir -p /opt/${pkgname}
sudo cp -rf * /opt/${pkgname}
cd build
echo "Installing $pkgname"
sudo make install
echo "Enabling mongodb service"
sudo systemctl enable --now mongodb.service
}