Commit 73225a11 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Create a basic makefile with "make install" support.

Create the mp3wavweb.conf Apache configuration file.
parent 140323e4
*~
/__pycache__
/mp3wavweb.conf
AUDIOROOT = /media/ljud
WSGIDIR = /etc/apache2/mp3wavweb
all: mp3wavweb.conf
mp3wavweb.conf: Makefile
echo 'WSGIScriptAlias / $(WSGIDIR)/mp3wavweb.py' >> $@.tmp
echo '<Directory $(WSGIDIR)>' >> $@.tmp
echo ' Order allow,deny' >> $@.tmp
echo ' Allow from all' >> $@.tmp
echo ' AuthName "Audio Access"' >> $@.tmp
echo ' AuthType Basic' >> $@.tmp
echo ' AuthUserFile /etc/apache2/htpasswd.users' >> $@.tmp
echo ' Require valid-user' >> $@.tmp
echo '</Directory>' >> $@.tmp
chmod 444 $@.tmp
mv -f $@.tmp $@
install: all
mkdir -p $(WSGIDIR)
cp mp3wavweb.conf /etc/apache2/conf.d/
echo "BASE = '$(AUDIOROOT)'" > $(WSGIDIR)/mp3wavcfg.py
cp mp3wavweb.py $(WSGIDIR)/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment