debmaker/ressources/umap/debmaker

46 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
VERSION=2.7.1
APP=umap
DEPOT=https://github.com/umap-project/umap.git
GIT_VERSION=${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=6
PACKAGE_DEPENDENCY="python3-pip python-is-python3 python3-venv npm"
main(){
base_package_upgrade
install_package_dependency
get_git_source
build
#makedeb
}
build(){
cd /tmp/${APP}
python3 -m venv .venv
PATH=/tmp/umap/.venv/bin/:$PATH
make install
make installjs
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
mkdir -p ${PATH_DEB}/etc/umap/
mkdir -p ${PATH_DEB}/etc/nginx/sites-available/
mkdir -p ${PATH_DEB}/usr/share/
mkdir -p ${PATH_DEB}/usr/lib/systemd/system/
cp -fr /tmp/${APP}/ ${PATH_DEB}/usr/share/
mv ${PATH_DEB}/umap.ngnix ${PATH_DEB}/etc/nginx/sites-available/umap
mv ${PATH_DEB}/umap.conf ${PATH_DEB}/etc/umap/
mv ${PATH_DEB}/uwsgi_params ${PATH_DEB}/etc/umap/
mv ${PATH_DEB}/uwsgi.ini ${PATH_DEB}/etc/umap/
mv ${PATH_DEB}/umap.service ${PATH_DEB}/usr/lib/systemd/system/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}