pkgname='melody-server' pkgver=r11.51f905f pkgrel=1 pkgdesc='' license=('MIT') arch=('x86_64') source=('git+https://gitlab.com/melody_music_tools/melody_server.git') md5sums=('SKIP') pkgver() { cd "$srcdir/melody_server/backend/" # Git, tags available #printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" # Git, no tags available printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } #prepare() { # cd "$srcdir/melody_server/backend/" # patch -p1 -i "$srcdir/${pkgname%-VCS}.patch" #} build() { cd "$srcdir/melody_server/backend/" cargo build --release # ./autogen.sh # ./configure --prefix=/usr # make } #check() { # cd "$srcdir/${pkgname%-VCS}" # make -k check #} package() { cd "$srcdir/melody_server/" mkdir -p "$pkgdir/usr/bin/" cp target/release/melody_server "$pkgdir/usr/bin/" mkdir -p "$pkgdir/etc/systemd/system/" cp systemd/melody.service "$pkgdir/etc/systemd/system/" }