1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-02 06:11:10 +00:00

Added support for release codenames

This commit is contained in:
Kim Holviala 2016-01-01 10:55:49 +02:00
parent 386d09908d
commit 6b02504df2
3 changed files with 9 additions and 6 deletions

View File

@ -5,10 +5,11 @@
#
# Variables and default configuration
#
NAME = gophernicus
PACKAGE = $(NAME)
BINARY = in.$(NAME)
VERSION = 1.8.1
NAME = gophernicus
PACKAGE = $(NAME)
BINARY = in.$(NAME)
VERSION = 2.0-beta
CODENAME = for Workgroups
SOURCES = $(NAME).c file.c menu.c string.c platform.c session.c options.c
HEADERS = functions.h files.h
@ -92,7 +93,7 @@ $(BINARY): $(OBJECTS)
$(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJECTS) -o $@
.c.o:
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
headers: $(HEADERS)

2
file.c
View File

@ -328,6 +328,8 @@ void setenv_cgi(state *st, char *script)
setenv("GOPHER_REFERER", st->req_referrer, 1);
snprintf(buf, sizeof(buf), "%i", st->out_width);
setenv("COLUMNS", buf, 1);
snprintf(buf, sizeof(buf), CODENAME);
setenv("SERVER_CODENAME", buf, 1);
/* Bucktooth extras */
if (*st->req_query_string) {

View File

@ -21,7 +21,7 @@ Generic information:
=echo " your ip address: $REMOTE_ADDR"
=echo " server time....: `date`"
=echo " server uptime..: `uptime | sed 's/.*up *\([^,]*\), .*/\1/'`"
=echo " server version.: $SERVER_VERSION"
=echo " server version.: $SERVER_VERSION \"$SERVER_CODENAME\""
=echo " server platform: $SERVER_ARCH"
=echo " description....: $SERVER_DESCRIPTION"