From 86c96011c090a8d8304c28043acaf13cdb37f28e Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Sat, 25 Jul 2020 14:11:27 -0400
Subject: rpm installs index.html
---
Makefile | 11 ++++++++---
minimun.spec | 8 +++++---
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 37ce858..73cf841 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,10 @@
DESTDIR=/home/minimun/minimun
VER=1.1
+WEBLOC=/minimun
+SYSWEBROOT=/var/www/html
+WEBROOT=$(SYSWEBROOT)$(WEBLOC)
+DIRS=$(DESTDIR) $(WEBROOT)
all: format.tex minimun
@@ -15,14 +19,15 @@ format.tex: orig/format.tex
clean:
rm minimun
-install: $(DESTDIR) all
+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)
-SRC =LICENCE logo.png Makefile minimun.ini orig\
+SRC = LICENCE logo.png Makefile minimun.ini orig\
nginx.example.conf README www minimun.spec
dist: minimun.tar.gz
mkdir -pv ~/rpmbuild/SOURCES
@@ -34,5 +39,5 @@ minimun.tar.gz: $(SRC)
tar -czf minimun.tar.gz minimun-$(VER)
rm -rf minimun-$(VER)
-$(DESTDIR):
+$(DIRS):
mkdir -p $@
diff --git a/minimun.spec b/minimun.spec
index ce5480e..911188c 100644
--- a/minimun.spec
+++ b/minimun.spec
@@ -1,7 +1,7 @@
Summary: A perl cgi/pdfTeX script for doc generation
Name: minimun
Version: 1.1
-Release: 1
+Release: 2
License: GPL, Unknown
Source: https://hrhr.dev/src/minimun.tar.gz
URL: https://git.hrhr.dev/minimun/about
@@ -33,11 +33,12 @@ getent passwd minimun >/dev/null || useradd -r -s /sbin/nologin\
%setup
%build
-make DESTDIR=/usr/lib/minimun
+make DESTDIR=/usr/lib/minimun SYSWEBROOT=/var/www/html
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT/usr/lib/minimun
+make install DESTDIR=$RPM_BUILD_ROOT/usr/lib/minimun \
+SYSWEBROOT=$RPM_BUILD_ROOT/var/www/html
%clean
rm -rf $RPM_BUILD_ROOT
@@ -47,3 +48,4 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644, minimun, minimun, 755)
/usr/lib/minimun
%attr(755, minimun, minimun) /usr/lib/minimun/minimun
+/var/www/html/minimun/index.html
--
cgit