#------------------------------------------------------------------------------ # Copyright (c) 2012-2021 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2012-11-04 jed # Last Update: $Id$ # # !!! this is not a script but an step-by-step howto !!! #------------------------------------------------------------------------------ exit 1 # - needs the following environment to build: gcc v3.3.4 # - needs the following library packages to be build: - libssl1_1 - libssl-dev # - needs the following packages to be build: + base 2.8.3 ### RPM build info ### # 1. download the software archive: https://acme.com/software/mini_httpd/mini_httpd-1.30.tar.gz # # 2. copy the software archive and the patch file # 'mini_httpd-1.30_eisfair_patch.diff' to the ./SOURCES directory. # # 29.10.2018/JED - the htpasswd binary should now be usable without a # segmentation fault, because the following modification has been # integrated.https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819125 # # 3. copy the mini_httpd.spec file to the ./SPECS directory. # # If the RPM build process is used instead of the manual build process, # the following package can be ignored and aren't required for this # package: # - # # RPM build command: # rpmbuild -ba --rmsource ./SPECS/mini_httpd.spec ### manual buold process ### # 1. download files wget http://acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz wget http://mirror.yongbok.net/pfsense/packages/config/patches/mini_httpd.c.patch # 2. extract files tar xvzf mini_httpd-1.19.tar.gz mkdir ./mini_httpd-1.19/patches mv mini_httpd.c.patch ./mini_httpd-1.19/patches/mini_httpd-1.19.patch # 3. patch distribution cd mini_httpd-1.19 patch < ./patches/mini_httpd-1.19.patch # 4. customize Makefile # - enable SSL support # - set BINDIR CRYPT_LIB = -lcrypt # Makefile SSL_TREE = /usr SSL_DEFS = -DUSE_SSL SSL_INC = -I${SSL_TREE}/include SSL_LIBS = -L${SSL_TREE}/lib -lssl -lcrypto BINDIR = /usr/sbin MANDIR = /usr/local/man CC = gcc CDEFS = ${SSL_DEFS} ${SSL_INC} CFLAGS = -O ${CDEFS} LDFLAGS = -s LDLIBS = ${SSL_LIBS} ${SYSV_LIBS} ${CRYPT_LIB} ... # 5. build program make rm -f mime_encodings.h sed < mime_encodings.txt > mime_encodings.h \ -e 's/#.*//' -e 's/[ ]*$//' -e '/^$/d' \ -e 's/[ ][ ]*/", 0, "/' -e 's/^/{ "/' -e 's/$/", 0 },/' rm -f mime_types.h sed < mime_types.txt > mime_types.h \ -e 's/#.*//' -e 's/[ ]*$//' -e '/^$/d' \ -e 's/[ ][ ]*/", 0, "/' -e 's/^/{ "/' -e 's/$/", 0 },/' gcc -O -DUSE_SSL -I/usr/include -c mini_httpd.c gcc -O -DUSE_SSL -I/usr/include -c match.c gcc -O -DUSE_SSL -I/usr/include -c tdate_parse.c gcc -O -DUSE_SSL -I/usr/include -s mini_httpd.o match.o tdate_parse.o -L/usr/lib -lssl -lcrypto -lcrypt -o mini_httpd gcc -O -DUSE_SSL -I/usr/include -c htpasswd.c gcc -O -DUSE_SSL -I/usr/include -s htpasswd.o -lcrypt -o htpasswd # 6. package files strip -s htpasswd mini_httpd tar cvzf ../mini_httpd-1.19-e1.tgz Makefile README htpasswd htpasswd.1 mime_encodings.txt mime_types.txt mini_httpd mini_httpd.8 mini_httpd.cnf