Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ MacOS
```brew install gettext && brew install openssl```
To compile on mac you need to edit the Makefile to point to openssl@3 within the homebrew install dir

FreeBSD
```
pkg install gettext
```
FreeBSD includes OpenSSL in base, it only requires to install gettext via ports or pkg. A custom BSDmakefile is provided for build and installation.

## Author
Alexia Michelle

Expand Down
47 changes: 47 additions & 0 deletions src/BSDmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Makefile for sslcheck
# https://github.com/alexiarstein/sslcheck
# If you're building on macOS, be sure to install gettext and openssl.
# Maintained by Alexia Michelle
# Modified by Joel Pelaez Jorge for FreeBSD

CC = cc
CFLAGS = -Wall -O2 -I/usr/local/include
LDFLAGS = -L/usr/local/lib
LIBS = -lssl -lcrypto -lintl

OUTPUT = sslcheck
SOURCES = sslcheck.c

UNAME_S := $(shell uname -s)
PREFIX = /usr/local
DOMAIN = sslcheck
LOCALEDIR = ${PREFIX}/share/locale
BINDIR = ${PREFIX}/bin
POFILES = es fr en it

all: sslcheck mo

sslcheck: sslcheck.c
@echo "Compiling for: ${UNAME_S}"
${CC} ${CFLAGS} -DLOCALE_PATH=\"${LOCALEDIR}\" -o ${OUTPUT} ${SOURCES} ${LDFLAGS} ${LIBS}

mo:
@echo "Compiling translation files..."
@for lang in ${POFILES}; do \
echo " $$lang"; \
msgfmt $$lang.po -o $$lang.mo; \
done

install: all
@echo "Installing binary to ${BINDIR}"
@mkdir -p ${DESTDIR}${BINDIR}
install -m 755 sslcheck ${DESTDIR}${BINDIR}/sslcheck
@echo "Installing locales to ${LOCALEDIR}"
@for lang in ${POFILES}; do \
mkdir -p ${DESTDIR}${LOCALEDIR}/$$lang/LC_MESSAGES; \
install -m 644 $$lang.mo ${DESTDIR}${LOCALEDIR}/$$lang/LC_MESSAGES/${DOMAIN}.mo; \
done

clean:
@rm -f sslcheck *.mo *~
@echo "Clean complete."
2 changes: 2 additions & 0 deletions src/sslcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
// Header file

#define _(STRING) gettext(STRING)
#ifndef LOCALE_PATH
#define LOCALE_PATH "/usr/share/locale"
#endif
#define VERSION "1.2.0"
#define AUTHOR "Alexia Michelle <alexia@goldendoglinux.org>"

Expand Down