diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-06-02 19:12:47 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-06-02 19:19:07 -0400 |
commit | 933d9dc16902b1996c8fdca8682372b548c970db (patch) | |
tree | e0fa6a167e99065a600648ebd06a8ccd0a62ad5b | |
parent | 1305a5fe1515c0b678ccb2a0becda5a8e4abf6da (diff) |
simplified modifications and improved spec
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | minimun.orig | 10 | ||||
-rw-r--r-- | minimun.spec | 9 |
3 files changed, 13 insertions, 7 deletions
@@ -12,6 +12,7 @@ clean: install: $(DESTDIR) minimun cp -t $(DESTDIR) minimun format.tex logo.png + chown minimun:minimun $(DESTDIR)/{minimun,format.tex,logo.png,} uninstall: rm $(DESTDIR)/{minimun,format.tex,logo.png} diff --git a/minimun.orig b/minimun.orig index bf07a25..5ad7dc8 100644 --- a/minimun.orig +++ b/minimun.orig @@ -41,11 +41,9 @@ else{ $in .= "\\bye\n"; my $timestamp = time; -run ['/usr/bin/pdftex', '-jobname', "$timestamp", 'format.tex'], '<', \$in, '>', \$out; +run ['/usr/bin/pdftex', '-jobname', "/tmp/$timestamp", 'format.tex'], '<', \$in, '>', \$out; print "Content-type: application/pdf\n\n"; -open(DOC, '<', "$timestamp.pdf"); -while (<DOC>){ - print; -} +open(DOC, '<', "/tmp/$timestamp.pdf"); +print <DOC>; close(DOC); -unlink "$timestamp.pdf", "$timestamp.log"; +unlink "/tmp/$timestamp.pdf", "/tmp/$timestamp.log"; diff --git a/minimun.spec b/minimun.spec index 4580006..440b6f7 100644 --- a/minimun.spec +++ b/minimun.spec @@ -1,7 +1,7 @@ Summary: A perl cgi/pdfTeX script for doc generation Name: minimun Version: 1.0 -Release: 1 +Release: 2 License: GPL, Unknown Source: https://hrhr.dev/src/minimun.tar.gz URL: https://git.hrhr.dev/minimun/about @@ -10,6 +10,8 @@ Vendor: Holden Rohrer Packager: Holden Rohrer <hr@hrhr.dev> BuildArch: noarch Requires: perl +Requires(pre): shadow-utils +BuildRequires: make %description This script builds award documents and room name sheets, for letter-size @@ -17,6 +19,11 @@ paper. The code is under GPLv3, but the logo's license is unknown. %global debug_package %{nil} +%pre +getent group minimun >/dev/null || groupadd -r minimun +getent passwd minimun >/dev/null || useradd -r -s /sbin/nologin\ + -g minimun -c "miniMUN cgi account" -d /usr/lib/minimun -M minimun + %prep %setup |