|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../clockspeed/clockspeed.conf
|
|
|
|
# Copyright (C) 2008 - 2011 The OpenSDE Project
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
makeopt="$makeopt sntpclock taiclock taiclockd clockspeed clockadd clockview leapsecs.dat"
|
|
|
|
|
|
|
|
clockspeed_config() {
|
|
|
|
echo $CC > conf-cc
|
|
|
|
echo $CC > conf-ld
|
|
|
|
echo /$prefix > conf-home
|
|
|
|
# clockspeed is x86 / solaris only ...
|
|
|
|
[[ $arch = x86* ]] || sed -i 's/ clockspeed / /' Makefile
|
|
|
|
}
|
|
|
|
|
|
|
|
# the included install procedure is gather grave and not cross compile aware,
|
|
|
|
# since it builds a custom install binary doing the work ...
|
|
|
|
makeinstopt=
|
|
|
|
clockspeed_install() {
|
|
|
|
while read dir file ; do
|
|
|
|
# only available on x86*
|
|
|
|
[[ $arch != x86* ]] && [[ $file = clockspeed* ]] && continue
|
|
|
|
mkdir -p $root/$prefix/$dir
|
|
|
|
cp $file $root/$prefix/$dir/$file
|
|
|
|
done < <( grep "$installfiles" hier.c | cut -d'"' --output-delimiter ' ' -f 2,4 )
|
|
|
|
|
|
|
|
# install leapsecs.dat
|
|
|
|
# mkdir -p $root/var/state/clockspeed
|
|
|
|
cp leapsecs.dat $root$sysconfdir
|
|
|
|
|
|
|
|
# install clockctl
|
|
|
|
rock_substitute "$confdir/clockctl.sh" > "$root$bindir/clockctl"
|
|
|
|
chmod +x "$root$bindir/clockctl"
|
|
|
|
cp "$confdir/etc_conf_clockspeed.txt" "$root/etc/conf/clockspeed"
|
|
|
|
|
|
|
|
# and clockspeed-adjust
|
|
|
|
install -m 755 "$confdir/clockspeed-adjust.sh" "$root$bindir/clockspeed-adjust"
|
|
|
|
}
|
|
|
|
|
|
|
|
hook_add premake 5 'clockspeed_config'
|
|
|
|
hook_add postmake 5 "clockspeed_install"
|
|
|
|
|
|
|
|
hook_add preconf 5 "cp -v $( match_source_file -p leapsecs ) leapsecs.dat"
|
|
|
|
|
|
|
|
# by default install binaries only
|
|
|
|
installfiles="c(.*bin"
|
|
|
|
# only build and install man pages if groff package is available
|
|
|
|
if pkginstalled groff; then
|
|
|
|
var_append makeopt ' ' "man"
|
|
|
|
var_append installfiles "\|" "c(.*man"
|
|
|
|
fi
|