Skip to content

Commit

Permalink
build: drop ROOTPREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Sep 19, 2024
1 parent 171ba6d commit e5432e7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 28 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ We don't support building a static OpenRC with PAM.
`LOCAL_PREFIX` should be set to where user maintained packages are.
Only set `LOCAL_PREFIX` if different from `PKG_PREFIX`.

`ROOTPREFIX` should be set when the root path is different from '/'.

`rc` and `rc.shutdown` are the hooks from the BSD init into OpenRC.

`devd.conf` is modified from FreeBSD to call `/etc/rc.devd` which is a
Expand Down
15 changes: 3 additions & 12 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,14 @@ else
pkg_prefix = option_pkg_prefix
endif

rootprefix = get_option('rootprefix')
if rootprefix == ''
rootprefix = '/'
endif

bindir = rootprefix / get_option('bindir')
libdir = rootprefix / get_option('libdir')
bindir = get_option('bindir')
libdir = get_option('libdir')
libexecdir = get_option('libexecdir')
if os == 'Linux' and libexecdir == 'libexec'
libexecdir = 'lib'
endif
libexecdir = rootprefix / libexecdir
sbindir = get_option('sbindir')
rc_libexecdir = libexecdir / 'rc'
rc_bindir = rc_libexecdir / 'bin'
rc_sbindir = rc_libexecdir / 'sbin'
rc_shdir = rc_libexecdir / 'sh'
sbindir = rootprefix / get_option('sbindir')
pamdir = get_option('sysconfdir') / 'pam.d'

crypt_dep = []
Expand Down
2 changes: 0 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ option('pkg_prefix', type : 'string',
description : 'default location where packages are installed')
option('pkgconfig', type : 'boolean',
description : 'build PKGConfig files')
option('rootprefix', type : 'string',
description : 'override the root prefix')
option('selinux', type : 'feature', value : 'auto',
description : 'enable SELinux support')
option('shell', type : 'string', value : '/bin/sh',
Expand Down
8 changes: 1 addition & 7 deletions sh/functions.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,10 @@ if [ -n "$ZSH_VERSION" ]; then
fi

# Make a sane PATH
_PREFIX=@PREFIX@
_PKG_PREFIX=@PKG_PREFIX@
_LOCAL_PREFIX=@LOCAL_PREFIX@
_LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local}
_PATH=@LIBEXECDIR@/bin
case "$_PREFIX" in
"$_PKG_PREFIX"|"$_LOCAL_PREFIX") ;;
*) _PATH="$_PATH:$_PREFIX/bin:$_PREFIX/sbin";;
esac
_PATH="$_PATH":/bin:/sbin:/usr/bin:/usr/sbin
_PATH="@LIBEXECDIR@/bin:/bin:/sbin:/usr/bin:/usr/sbin"

if [ -n "$_PKG_PREFIX" ]; then
_PATH="$_PATH:$_PKG_PREFIX/bin:$_PKG_PREFIX/sbin"
Expand Down
5 changes: 0 additions & 5 deletions sh/meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
sh_conf_data = configuration_data()
if rootprefix == '/'
sh_conf_data.set('PREFIX', '')
else
sh_conf_data.set('PREFIX', rootprefix)
endif
sh_conf_data.set('BINDIR', bindir)
sh_conf_data.set('LIBEXECDIR', rc_libexecdir)
sh_conf_data.set('LOCAL_PREFIX', local_prefix)
Expand Down

0 comments on commit e5432e7

Please sign in to comment.