aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-07-29 22:12:37 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-07-29 22:12:37 -0400
commit8b20d2feb0d39613962ff3fd11beb9a83ab1473b (patch)
treed0868c062b2bcf6dc4b66d95b69c77d89a56bfb2 /Makefile
parent86c96011c090a8d8304c28043acaf13cdb37f28e (diff)
centralized version stuff into the makefile and js->css
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 73cf841..9db040e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
.POSIX:
DESTDIR=/home/minimun/minimun
-VER=1.1
WEBLOC=/minimun
SYSWEBROOT=/var/www/html
WEBROOT=$(SYSWEBROOT)$(WEBLOC)
DIRS=$(DESTDIR) $(WEBROOT)
+VER=1.2
+REL=1
all: format.tex minimun
@@ -17,27 +18,33 @@ format.tex: orig/format.tex
sed 's:%%DEST%%:$(DESTDIR):' orig/format.tex > format.tex
clean:
- rm minimun
+ rm -f minimun format.tex minimun.spec minimun.tar.gz \
+ minimun-$(VER)-$(REL).noarch.rpm
install: $(DIRS) all
cp -t $(DESTDIR) minimun format.tex logo.png
cp -RT www $(WEBROOT)
uninstall:
- rm $(DESTDIR)/{minimun,format.tex,logo.png}
- rmdir -p $(DESTDIR)
+ rm -f $(DESTDIR)/{minimun,format.tex,logo.png} $(WEBROOT)/*
+ rmdir -p $(DIRS)
SRC = LICENCE logo.png Makefile minimun.ini orig\
nginx.example.conf README www minimun.spec
-dist: minimun.tar.gz
+dist: minimun.tar.gz minimun.spec
mkdir -pv ~/rpmbuild/SOURCES
cp minimun.tar.gz ~/rpmbuild/SOURCES
rpmbuild minimun.spec -ba
+ cp ~/rpmbuild/RPMS/noarch/minimun-$(VER)-$(REL).noarch.rpm .
+ touch dist
minimun.tar.gz: $(SRC)
mkdir minimun-$(VER)
cp -r -t minimun-$(VER) $(SRC)
tar -czf minimun.tar.gz minimun-$(VER)
rm -rf minimun-$(VER)
+minimun.spec: orig/minimun.spec
+ sed -e 's/VERSION/$(VER)/' -e 's/RELEASE/$(REL)/' orig/minimun.spec\
+ > $@
$(DIRS):
mkdir -p $@