-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1489 from hadfl/pam_radius
- Loading branch information
Showing
8 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/bash | ||
# | ||
# {{{ CDDL HEADER | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
# }}} | ||
|
||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
. ../../lib/build.sh | ||
|
||
PROG=pam_radius | ||
VER=2.0.0 | ||
PKG=ooce/security/pam_radius | ||
SUMMARY="RADIUS PAM module" | ||
DESC="PAM to RADIUS authentication module" | ||
|
||
test_relver '>=' 151051 && set_clangver | ||
|
||
set_builddir $PROG-release_${VER//./_} | ||
|
||
XFORM_ARGS=" | ||
-DPREFIX=${PREFIX#/} | ||
-DPROG=$PROG | ||
" | ||
|
||
NO_SONAME_EXPECTED=1 | ||
|
||
LDFLAGS[i386]+=" -lssp_ns" | ||
|
||
save_variables CFLAGS LDFLAGS | ||
|
||
pre_make() { | ||
typeset arch=$1 | ||
|
||
restore_variables CFLAGS LDFLAGS | ||
|
||
subsume_arch $arch CFLAGS | ||
subsume_arch $arch LDFLAGS | ||
|
||
CFLAGS+=" $CTF_CFLAGS" | ||
CFLAGS+=" -DCONF_FILE=\\\"/etc$PREFIX/$PROG/${PROG}_auth.conf\\\"" | ||
LDFLAGS+=" -L${SYSROOT[$arch]}/usr/${LIBDIRS[$arch]} -lsocket" | ||
} | ||
|
||
pre_install() { | ||
typeset arch=$1 | ||
|
||
PAMDIR=$PREFIX/lib/${LIBDIRS[$arch]/lib/security} | ||
|
||
logcmd $MKDIR -p $DESTDIR$PAMDIR || logerr "mkdir failed" | ||
logcmd $MKDIR -p $DESTDIR/etc$PREFIX/$PROG || logerr "mkdir failed" | ||
|
||
logcmd $CP $TMPDIR/$BUILDDIR/${PROG}_auth.so $DESTDIR$PAMDIR \ | ||
|| logerr "copying PAM module failed" | ||
logcmd $CP $TMPDIR/$BUILDDIR/${PROG}_auth.conf $DESTDIR/etc$PREFIX/$PROG \ | ||
|| logerr "copying PAM config failed" | ||
|
||
# no install target | ||
false | ||
} | ||
|
||
init | ||
download_source $PROG release_${VER//./_} | ||
patch_source | ||
prep_build | ||
build | ||
make_package | ||
clean_up | ||
|
||
# Vim hints | ||
# vim:ts=4:sw=4:et:fdm=marker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This file and its contents are supplied under the terms of the | ||
# Common Development and Distribution License ("CDDL"), version 1.0. | ||
# You may only use this file in accordance with the terms of version | ||
# 1.0 of the CDDL. | ||
# | ||
# A full copy of the text of the CDDL should have accompanied this | ||
# source. A copy of the CDDL is also available via the Internet at | ||
# http://www.illumos.org/license/CDDL. | ||
|
||
# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. | ||
|
||
license LICENSE license=GPLv2 | ||
|
||
<transform dir path=etc/$(PREFIX)/$(PROG) -> set mode 0700> | ||
<transform file path=etc/$(PREFIX)/$(PROG) -> set mode 0600> | ||
<transform file path=etc/$(PREFIX)/$(PROG) -> set preserve renamenew> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
this fixes linking ssp_ns for the 32-bit build | ||
|
||
diff -wpruN --no-dereference '--exclude=*.orig' a~/Makefile a/Makefile | ||
--- a~/Makefile 1970-01-01 00:00:00 | ||
+++ a/Makefile 1970-01-01 00:00:00 | ||
@@ -65,7 +65,7 @@ src/md5.o: src/md5.c src/md5.h | ||
# gcc -shared pam_radius_auth.o md5.o -lpam -lc -o pam_radius_auth.so | ||
# | ||
pam_radius_auth.so: src/pam_radius_auth.o src/md5.o | ||
- $(CC) $(LDFLAGS) $^ -lpam -o pam_radius_auth.so | ||
+ $(CC) $^ -lpam -o pam_radius_auth.so $(LDFLAGS) | ||
|
||
###################################################################### | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ldflags.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters