mirror of
https://github.com/lxsang/ant-http
synced 2024-12-26 00:38:21 +01:00
Makefile now allow to create .deb package
This commit is contained in:
parent
c06e72a3e8
commit
80069bf42e
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ plugins
|
|||||||
build
|
build
|
||||||
*._*
|
*._*
|
||||||
*.d
|
*.d
|
||||||
|
*.deb
|
||||||
.vscode
|
.vscode
|
||||||
# Object files
|
# Object files
|
||||||
*.o
|
*.o
|
||||||
|
21
Makefile
21
Makefile
@ -56,6 +56,27 @@ plugin:
|
|||||||
|
|
||||||
clean: sclean pclean
|
clean: sclean pclean
|
||||||
|
|
||||||
|
deb:
|
||||||
|
-rm -r package
|
||||||
|
-rm *.deb
|
||||||
|
mkdir -p package/opt/www/htdocs
|
||||||
|
mkdir package/opt/www/plugins
|
||||||
|
mkdir package/opt/www/database package/opt/www/tmp
|
||||||
|
mkdir package/DEBIAN
|
||||||
|
cp $(BUILDIRD)/httpd package/opt/www
|
||||||
|
chmod a+x package/opt/www/httpd
|
||||||
|
cp -rf $(BUILDIRD)/plugins/* package/opt/www/plugins
|
||||||
|
cp antd package/opt/www
|
||||||
|
chmod a+x package/opt/www/antd
|
||||||
|
cp config.ini.tpl package/opt/www/config.ini
|
||||||
|
echo "Package: antd" > package/DEBIAN/control
|
||||||
|
echo "Version: 1.0.0" >> package/DEBIAN/control
|
||||||
|
echo "Maintainer: Xuan Sang LE" >> package/DEBIAN/control
|
||||||
|
echo "Architecture: all" >> package/DEBIAN/control
|
||||||
|
echo "Description: Lighweight HTTP/HTTPs server" >> package/DEBIAN/control
|
||||||
|
dpkg-deb --build package
|
||||||
|
-rm -r package
|
||||||
|
|
||||||
sclean:
|
sclean:
|
||||||
-rm -f *.o $(BUILDIRD)/httpd
|
-rm -f *.o $(BUILDIRD)/httpd
|
||||||
-rm *.$(EXT)
|
-rm *.$(EXT)
|
||||||
|
52
config.ini.tpl
Normal file
52
config.ini.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
[SERVER]
|
||||||
|
; server port
|
||||||
|
; use 443 if one want to use
|
||||||
|
; SSL
|
||||||
|
port=8080
|
||||||
|
; plugin directory
|
||||||
|
plugins=/opt/www/plugins/
|
||||||
|
; plugin extension
|
||||||
|
plugins_ext=.dylib
|
||||||
|
; SQLITE database path
|
||||||
|
database=/opt/www/database/
|
||||||
|
; Website store here
|
||||||
|
htdocs=/opt/www/htdocs
|
||||||
|
; tmp dir
|
||||||
|
tmpdir=/opt/www/tmp/
|
||||||
|
; server backlocg
|
||||||
|
backlog=5000
|
||||||
|
; eable or disalbe SSL
|
||||||
|
ssl.enable=0
|
||||||
|
; if SSL is enable, one should specify
|
||||||
|
; the SSL cert and key files
|
||||||
|
; ssl.cert=fullchain.pem
|
||||||
|
; ssl.key=privkey.pem
|
||||||
|
|
||||||
|
; This enable some plugins to be initialised at server startup
|
||||||
|
[AUTOSTART]
|
||||||
|
; to start a plugin at server statup use:
|
||||||
|
;plugin = plugin_name_1
|
||||||
|
;plugin = plugin_name_2, etc
|
||||||
|
|
||||||
|
; sever rules
|
||||||
|
[RULES]
|
||||||
|
; For example the following rule will
|
||||||
|
; convert a request of type:
|
||||||
|
; name.example.com?rq=1
|
||||||
|
;TO:
|
||||||
|
; example.com/name/?rq=1
|
||||||
|
; this is helpful to redirect many sub domains
|
||||||
|
; to a sub folder of the same server
|
||||||
|
; ^([a-zA-Z][a-zA-Z0-9]*)\.[a-zA-Z0-9]+\..*$ = /<1><url>?<query>
|
||||||
|
; Sytax: [regular expression on the original request]=[new request rule]
|
||||||
|
|
||||||
|
[FILEHANDLER]
|
||||||
|
; specify a plugin for handling
|
||||||
|
; a file type
|
||||||
|
; lua page script
|
||||||
|
ls = lua-api
|
||||||
|
; pure lua script
|
||||||
|
lua = lua-api
|
||||||
|
; php and o ther scripting languages can be
|
||||||
|
; handled by the cgi plugin
|
||||||
|
; php = cgi
|
Loading…
Reference in New Issue
Block a user