aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Makefile17
-rw-r--r--orig/minimun.spec (renamed from minimun.spec)4
-rw-r--r--www/index.html42
4 files changed, 38 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index 2adc16f..1e6ca96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@ minimun
format.tex
!orig/*
minimun.tar.gz
+dist
+minimun.spec
+minimun-*.rpm
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 $@
diff --git a/minimun.spec b/orig/minimun.spec
index 911188c..c76dc31 100644
--- a/minimun.spec
+++ b/orig/minimun.spec
@@ -1,7 +1,7 @@
Summary: A perl cgi/pdfTeX script for doc generation
Name: minimun
-Version: 1.1
-Release: 2
+Version: VERSION
+Release: RELEASE
License: GPL, Unknown
Source: https://hrhr.dev/src/minimun.tar.gz
URL: https://git.hrhr.dev/minimun/about
diff --git a/www/index.html b/www/index.html
index 32634d4..d542208 100644
--- a/www/index.html
+++ b/www/index.html
@@ -2,33 +2,33 @@
<html>
<head>
<title>MiniMUN PDF Generator</title>
- <script>
- let curform = 'award';
- function switchShow(id){
- document.getElementById(curform).style.display = 'none';
- document.getElementById(id).style.display = '';
- curform = id;
+ <style>
+ input.sel {
+ display: inline;
+ text-align: center;
}
- window.addEventListener('load',function(){
- if (document.getElementById('roombutton').checked) switchShow('room');
- });
- </script>
+ input#awardbutton:checked ~ form#room {
+ display: none;
+ }
+ input#roombutton:checked ~ form#award {
+ display: none;
+ }
+ </style>
</head>
<body>
- <h4>Form Type:</h4>
- <input type="radio" name="form" value="award" onchange="switchShow('award')" checked>Award</input><br>
- <input type="radio" name="form" id="roombutton" value="room" onchange="switchShow('room')">Room</input><br>
+ <input type="radio" name="form" id="awardbutton" class="sel" value="award" checked>Award</input>
+ <input type="radio" name="form" id="roombutton" class="sel" value="room">Room</input>
<form action="award" method="get" id="award" class="submit">
- Committee: <input type="text" name="committee"/><br>
- Country: <input type="text" name="country"/><br>
- Award Name: <input type="text" name="award"/><br>
- School: <input type="text" name="school"/><br>
- <input type="submit"/>
+ <p>Committee: <input type="text" name="committee"/></p>
+ <p>Country: <input type="text" name="country"/></p>
+ <p>Award Name: <input type="text" name="award"/></p>
+ <p>School: <input type="text" name="school"/></p>
+ <p><input type="submit"/></p>
</form>
- <form action="room" style="display: none" id="room" class="submit">
- Committee: <input type="text" name="committee"/><br>
- <input type="submit"/>
+ <form action="room" id="room" class="submit">
+ <p>Committee: <input type="text" name="committee"/></p>
+ <p><input type="submit"/></p>
</form>
</body>
</html>