54 lines
1.7 KiB
Makefile
54 lines
1.7 KiB
Makefile
|
# spmenuify
|
||
|
# Theme manager for spmenu
|
||
|
# https://git.speedie.site/spmenuify
|
||
|
#
|
||
|
# Copyright (C) 2022 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 = 0.1
|
||
|
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}
|
||
|
|
||
|
dist:
|
||
|
mkdir -p ${NAME}-${VER}
|
||
|
cp ${NAME} spmenu_profile README.md LICENSE Makefile *.mk ${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/$(VERSION)/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 spmenu-$(VERSION).PKGBUILD; mv PKGBUILD.orig PKGBUILD
|