spmenuify/Makefile
2023-07-13 03:56:53 +02:00

57 lines
1.8 KiB
Makefile

# spmenuify
# Theme manager for spmenu
# https://git.speedie.site/spmenuify
#
# Copyright (C) 2023 speedie
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
VER = 1.0
DESTDIR = "/usr"
NAME = spmenuify
SHELL = /bin/sh
help:
@echo "make install Install ${NAME}."
@echo "make uninstall Uninstall ${NAME}."
@echo "make dist Create distro package for ${NAME}."
@echo "make pkg_arch Create packaging for Arch."
install:
cp ${NAME} spmenu_profile ${PREFIX}${DESTDIR}/bin
chmod +x ${PREFIX}${DESTDIR}/bin/${NAME} ${PREFIX}${DESTDIR}/bin/spmenu_profile
uninstall:
rm -rf ~/.config/${NAME}
rm -f ${PREFIX}${DESTDIR}/bin/${NAME}
clean:
rm -f *.zst* *.tar.gz ${NAME}-${VER}.PKGBUILD PKGBUILD.orig
dist: clean
mkdir -p ${NAME}-${VER}
cp ${NAME} spmenu_profile README.md LICENSE Makefile PKGBUILD buildconf build.sh ${NAME}-${VER}
tar -cf ${NAME}-${VER}.tar ${NAME}-${VER}
gzip ${NAME}-${VER}.tar
rm -rf ${NAME}-${VER}.tar ${NAME}-${VER}
pkg_arch: dist
command -v makepkg > /dev/null || exit 1
[ -f PKGBUILD ] || exit 1
cp -f PKGBUILD PKGBUILD.orig
sed -i "s/VERSION/${VER}/g; s/MD5SUM/$$(md5sum *.tar.gz | cut -d ' ' -f 1)/g" PKGBUILD
makepkg -sfr --sign || exit 1
rm -rf src/ pkg/ *.tar.gz
cp PKGBUILD ${NAME}-${VER}.PKGBUILD; mv PKGBUILD.orig PKGBUILD