From e5405c6a1a72f082e7bb2a928b4402a0d2f3be88 Mon Sep 17 00:00:00 2001 From: PedroEdiaz Date: Fri, 12 Jul 2024 14:09:03 +0600 Subject: [PATCH] Add package: thttpd --- extra/thttpd.d/Makefile | 34 ++++++ extra/thttpd.d/files/mime_types.h | 194 ++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 extra/thttpd.d/Makefile create mode 100644 extra/thttpd.d/files/mime_types.h diff --git a/extra/thttpd.d/Makefile b/extra/thttpd.d/Makefile new file mode 100644 index 0000000..a9c03e9 --- /dev/null +++ b/extra/thttpd.d/Makefile @@ -0,0 +1,34 @@ +version=2.29 + +package=thttpd +pkgver=${version}_0 +description=thttpd is a simple, small, portable, fast, and secure HTTP server. +homepage=https://www.acme.com/software/thttpd +license=BSD-2-Clause + +shlib-requires=libc.so + +include ../../Makefile + + +SOURCES = \ + ${package}-${version}.tar.gz + +FILES = \ + files/mime_types.h + +${package}-${version}.tar.gz: + ${DOWNLOAD} ${homepage}/$@ + +prepare: ${SOURCES} + tar -zxf ${package}-${version}.tar.gz + mv ${package}-${version} build/ + mv -f files/mime_types.h build + +root: + MAKE=${MAKE} ./configure + bmake + install -Dm755 thttpd "${root}/usr/bin/thttpd" +root-man: + install -Dm644 thttpd.8 "${root}/usr/share/man/man8/thttpd.8" + diff --git a/extra/thttpd.d/files/mime_types.h b/extra/thttpd.d/files/mime_types.h new file mode 100644 index 0000000..de6f375 --- /dev/null +++ b/extra/thttpd.d/files/mime_types.h @@ -0,0 +1,194 @@ +{ "a", 0, "application/octet-stream", 0 }, +{ "aab", 0, "application/x-authorware-bin", 0 }, +{ "aam", 0, "application/x-authorware-map", 0 }, +{ "aas", 0, "application/x-authorware-seg", 0 }, +{ "ai", 0, "application/postscript", 0 }, +{ "aif", 0, "audio/x-aiff", 0 }, +{ "aifc", 0, "audio/x-aiff", 0 }, +{ "aiff", 0, "audio/x-aiff", 0 }, +{ "asc", 0, "text/plain; charset=%s", 0 }, +{ "asf", 0, "video/x-ms-asf", 0 }, +{ "asx", 0, "video/x-ms-asf", 0 }, +{ "au", 0, "audio/basic", 0 }, +{ "avi", 0, "video/x-msvideo", 0 }, +{ "bcpio", 0, "application/x-bcpio", 0 }, +{ "bin", 0, "application/octet-stream", 0 }, +{ "bmp", 0, "image/bmp", 0 }, +{ "cdf", 0, "application/x-netcdf", 0 }, +{ "class", 0, "application/x-java-vm", 0 }, +{ "cpio", 0, "application/x-cpio", 0 }, +{ "cpt", 0, "application/mac-compactpro", 0 }, +{ "crl", 0, "application/x-pkcs7-crl", 0 }, +{ "crt", 0, "application/x-x509-ca-cert", 0 }, +{ "csh", 0, "application/x-csh", 0 }, +{ "css", 0, "text/css; charset=%s", 0 }, +{ "dcr", 0, "application/x-director", 0 }, +{ "dir", 0, "application/x-director", 0 }, +{ "djv", 0, "image/vnd.djvu", 0 }, +{ "djvu", 0, "image/vnd.djvu", 0 }, +{ "dll", 0, "application/octet-stream", 0 }, +{ "dms", 0, "application/octet-stream", 0 }, +{ "doc", 0, "application/msword", 0 }, +{ "dtd", 0, "text/xml; charset=%s", 0 }, +{ "dump", 0, "application/octet-stream", 0 }, +{ "dvi", 0, "application/x-dvi", 0 }, +{ "dxr", 0, "application/x-director", 0 }, +{ "eps", 0, "application/postscript", 0 }, +{ "etx", 0, "text/x-setext", 0 }, +{ "exe", 0, "application/octet-stream", 0 }, +{ "ez", 0, "application/andrew-inset", 0 }, +{ "fgd", 0, "application/x-director", 0 }, +{ "fh", 0, "image/x-freehand", 0 }, +{ "fh4", 0, "image/x-freehand", 0 }, +{ "fh5", 0, "image/x-freehand", 0 }, +{ "fh7", 0, "image/x-freehand", 0 }, +{ "fhc", 0, "image/x-freehand", 0 }, +{ "gif", 0, "image/gif", 0 }, +{ "gtar", 0, "application/x-gtar", 0 }, +{ "hdf", 0, "application/x-hdf", 0 }, +{ "hqx", 0, "application/mac-binhex40", 0 }, +{ "htm", 0, "text/html; charset=%s", 0 }, +{ "html", 0, "text/html; charset=%s", 0 }, +{ "ice", 0, "x-conference/x-cooltalk", 0 }, +{ "ief", 0, "image/ief", 0 }, +{ "iges", 0, "model/iges", 0 }, +{ "igs", 0, "model/iges", 0 }, +{ "iv", 0, "application/x-inventor", 0 }, +{ "jar", 0, "application/x-java-archive", 0 }, +{ "jfif", 0, "image/jpeg", 0 }, +{ "jpe", 0, "image/jpeg", 0 }, +{ "jpeg", 0, "image/jpeg", 0 }, +{ "jpg", 0, "image/jpeg", 0 }, +{ "js", 0, "application/x-javascript", 0 }, +{ "kar", 0, "audio/midi", 0 }, +{ "kml", 0, "application/vnd.google-earth.kml+xml", 0 }, +{ "kmz", 0, "application/vnd.google-earth.kmz", 0 }, +{ "latex", 0, "application/x-latex", 0 }, +{ "lha", 0, "application/octet-stream", 0 }, +{ "loc", 0, "application/xml-loc", 0 }, +{ "lzh", 0, "application/octet-stream", 0 }, +{ "m3u", 0, "audio/x-mpegurl", 0 }, +{ "man", 0, "application/x-troff-man", 0 }, +{ "mathml", 0, "application/mathml+xml", 0 }, +{ "me", 0, "application/x-troff-me", 0 }, +{ "mesh", 0, "model/mesh", 0 }, +{ "mid", 0, "audio/midi", 0 }, +{ "midi", 0, "audio/midi", 0 }, +{ "mif", 0, "application/vnd.mif", 0 }, +{ "mime", 0, "message/rfc822", 0 }, +{ "mml", 0, "application/mathml+xml", 0 }, +{ "mov", 0, "video/quicktime", 0 }, +{ "movie", 0, "video/x-sgi-movie", 0 }, +{ "mp2", 0, "audio/mpeg", 0 }, +{ "mp3", 0, "audio/mpeg", 0 }, +{ "mp4", 0, "video/mp4", 0 }, +{ "mpe", 0, "video/mpeg", 0 }, +{ "mpeg", 0, "video/mpeg", 0 }, +{ "mpg", 0, "video/mpeg", 0 }, +{ "mpga", 0, "audio/mpeg", 0 }, +{ "ms", 0, "application/x-troff-ms", 0 }, +{ "msh", 0, "model/mesh", 0 }, +{ "mv", 0, "video/x-sgi-movie", 0 }, +{ "mxu", 0, "video/vnd.mpegurl", 0 }, +{ "nc", 0, "application/x-netcdf", 0 }, +{ "o", 0, "application/octet-stream", 0 }, +{ "oda", 0, "application/oda", 0 }, +{ "ogg", 0, "application/ogg", 0 }, +{ "pac", 0, "application/x-ns-proxy-autoconfig", 0 }, +{ "pbm", 0, "image/x-portable-bitmap", 0 }, +{ "pdb", 0, "chemical/x-pdb", 0 }, +{ "pdf", 0, "application/pdf", 0 }, +{ "pgm", 0, "image/x-portable-graymap", 0 }, +{ "pgn", 0, "application/x-chess-pgn", 0 }, +{ "png", 0, "image/png", 0 }, +{ "pnm", 0, "image/x-portable-anymap", 0 }, +{ "ppm", 0, "image/x-portable-pixmap", 0 }, +{ "ppt", 0, "application/vnd.ms-powerpoint", 0 }, +{ "ps", 0, "application/postscript", 0 }, +{ "qt", 0, "video/quicktime", 0 }, +{ "ra", 0, "audio/x-realaudio", 0 }, +{ "ram", 0, "audio/x-pn-realaudio", 0 }, +{ "ras", 0, "image/x-cmu-raster", 0 }, +{ "rdf", 0, "application/rdf+xml", 0 }, +{ "rgb", 0, "image/x-rgb", 0 }, +{ "rm", 0, "audio/x-pn-realaudio", 0 }, +{ "roff", 0, "application/x-troff", 0 }, +{ "rpm", 0, "audio/x-pn-realaudio-plugin", 0 }, +{ "rss", 0, "application/rss+xml", 0 }, +{ "rtf", 0, "text/rtf; charset=%s", 0 }, +{ "rtx", 0, "text/richtext; charset=%s", 0 }, +{ "sgm", 0, "text/sgml; charset=%s", 0 }, +{ "sgml", 0, "text/sgml; charset=%s", 0 }, +{ "sh", 0, "application/x-sh", 0 }, +{ "shar", 0, "application/x-shar", 0 }, +{ "silo", 0, "model/mesh", 0 }, +{ "sit", 0, "application/x-stuffit", 0 }, +{ "skd", 0, "application/x-koan", 0 }, +{ "skm", 0, "application/x-koan", 0 }, +{ "skp", 0, "application/x-koan", 0 }, +{ "skt", 0, "application/x-koan", 0 }, +{ "smi", 0, "application/smil", 0 }, +{ "smil", 0, "application/smil", 0 }, +{ "snd", 0, "audio/basic", 0 }, +{ "so", 0, "application/octet-stream", 0 }, +{ "spl", 0, "application/x-futuresplash", 0 }, +{ "src", 0, "application/x-wais-source", 0 }, +{ "stc", 0, "application/vnd.sun.xml.calc.template", 0 }, +{ "std", 0, "application/vnd.sun.xml.draw.template", 0 }, +{ "sti", 0, "application/vnd.sun.xml.impress.template", 0 }, +{ "stw", 0, "application/vnd.sun.xml.writer.template", 0 }, +{ "sv4cpio", 0, "application/x-sv4cpio", 0 }, +{ "sv4crc", 0, "application/x-sv4crc", 0 }, +{ "svg", 0, "image/svg+xml", 0 }, +{ "svgz", 0, "image/svg+xml", 0 }, +{ "swf", 0, "application/x-shockwave-flash", 0 }, +{ "sxc", 0, "application/vnd.sun.xml.calc", 0 }, +{ "sxd", 0, "application/vnd.sun.xml.draw", 0 }, +{ "sxg", 0, "application/vnd.sun.xml.writer.global", 0 }, +{ "sxi", 0, "application/vnd.sun.xml.impress", 0 }, +{ "sxm", 0, "application/vnd.sun.xml.math", 0 }, +{ "sxw", 0, "application/vnd.sun.xml.writer", 0 }, +{ "t", 0, "application/x-troff", 0 }, +{ "tar", 0, "application/x-tar", 0 }, +{ "tcl", 0, "application/x-tcl", 0 }, +{ "tex", 0, "application/x-tex", 0 }, +{ "texi", 0, "application/x-texinfo", 0 }, +{ "texinfo", 0, "application/x-texinfo", 0 }, +{ "tif", 0, "image/tiff", 0 }, +{ "tiff", 0, "image/tiff", 0 }, +{ "tr", 0, "application/x-troff", 0 }, +{ "tsp", 0, "application/dsptype", 0 }, +{ "tsv", 0, "text/tab-separated-values; charset=%s", 0 }, +{ "txt", 0, "text/plain; charset=%s", 0 }, +{ "ustar", 0, "application/x-ustar", 0 }, +{ "vcd", 0, "application/x-cdlink", 0 }, +{ "vrml", 0, "model/vrml", 0 }, +{ "vx", 0, "video/x-rad-screenplay", 0 }, +{ "wasm", 0, "application/wasm", 0 }, +{ "wav", 0, "audio/x-wav", 0 }, +{ "wax", 0, "audio/x-ms-wax", 0 }, +{ "wbmp", 0, "image/vnd.wap.wbmp", 0 }, +{ "wbxml", 0, "application/vnd.wap.wbxml", 0 }, +{ "wm", 0, "video/x-ms-wm", 0 }, +{ "wma", 0, "audio/x-ms-wma", 0 }, +{ "wmd", 0, "application/x-ms-wmd", 0 }, +{ "wml", 0, "text/vnd.wap.wml", 0 }, +{ "wmlc", 0, "application/vnd.wap.wmlc", 0 }, +{ "wmls", 0, "text/vnd.wap.wmlscript", 0 }, +{ "wmlsc", 0, "application/vnd.wap.wmlscriptc", 0 }, +{ "wmv", 0, "video/x-ms-wmv", 0 }, +{ "wmx", 0, "video/x-ms-wmx", 0 }, +{ "wmz", 0, "application/x-ms-wmz", 0 }, +{ "wrl", 0, "model/vrml", 0 }, +{ "wsrc", 0, "application/x-wais-source", 0 }, +{ "wvx", 0, "video/x-ms-wvx", 0 }, +{ "xbm", 0, "image/x-xbitmap", 0 }, +{ "xht", 0, "application/xhtml+xml; charset=%s", 0 }, +{ "xhtml", 0, "application/xhtml+xml; charset=%s", 0 }, +{ "xls", 0, "application/vnd.ms-excel", 0 }, +{ "xml", 0, "text/xml; charset=%s", 0 }, +{ "xpm", 0, "image/x-xpixmap", 0 }, +{ "xsl", 0, "text/xml; charset=%s", 0 }, +{ "xwd", 0, "image/x-xwindowdump", 0 }, +{ "xyz", 0, "chemical/x-xyz", 0 }, +{ "zip", 0, "application/zip", 0 },