build-sys: frugalware linux support

This commit is contained in:
Miklos Vajna 2010-11-29 14:42:10 +01:00 committed by Kay Sievers
parent 3d428115cf
commit f5c88ec133
5 changed files with 31 additions and 3 deletions

View File

@ -76,12 +76,19 @@ AM_CPPFLAGS += \
-DKBD_SETFONT=\"/usr/bin/setfont\" \
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else
if TARGET_FRUGALWARE
AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-DKBD_SETFONT=\"/usr/bin/setfont\" \
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else
AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/bin/loadkeys\" \
-DKBD_SETFONT=\"/bin/setfont\" \
-DDEFAULT_FONT=\"latarcyrheb-sun16\"
endif
endif
endif
rootbin_PROGRAMS = \
systemd \

View File

@ -290,6 +290,7 @@ if test "z$with_distro" = "z"; then
AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
fi
if test "z$with_distro" = "z"; then
with_distro=`uname -s`
@ -362,6 +363,12 @@ case $with_distro in
AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
M4_DISTRO_FLAG=-DTARGET_SLACKWARE=1
;;
frugalware)
SYSTEM_SYSVINIT_PATH=/etc/rc.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
M4_DISTRO_FLAG=-DTARGET_FRUGALWARE=1
;;
other)
AS_IF([test "x$with_syslog_service" = "x"],
[AC_MSG_ERROR([With --distro=other, you must pass --with-syslog-service= to configure])])
@ -411,6 +418,7 @@ AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$wit
AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name])

View File

@ -32,7 +32,7 @@
#if defined(TARGET_FEDORA)
#define FILENAME "/etc/sysconfig/network"
#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE)
#define FILENAME "/etc/HOSTNAME"
#elif defined(TARGET_ARCH)
#define FILENAME "/etc/rc.conf"
@ -137,7 +137,7 @@ finish:
fclose(f);
return r;
#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE)
return read_and_strip_hostname(FILENAME, hn);
#else
return -ENOENT;

View File

@ -65,7 +65,7 @@ static const struct {
{ "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
#endif
#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU)
#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_FRUGALWARE)
/* Debian style rcS.d */
{ "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
#endif

View File

@ -267,6 +267,19 @@ int main(int argc, char **argv) {
log_warning("Failed to read /etc/rc.conf: %s", strerror(-r));
}
#elif defined(TARGET_FRUGALWARE)
if ((r = parse_env_file("/etc/sysconfig/keymap", NEWLINE,
"keymap", &vc_keymap,
NULL)) < 0) {
if (r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/keymap: %s", strerror(-r));
}
if ((r = parse_env_file("/etc/sysconfig/font", NEWLINE,
"font", &vc_font,
NULL)) < 0) {
if (r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/font: %s", strerror(-r));
}
#elif defined(TARGET_GENTOO)
if ((r = parse_env_file("/etc/rc.conf", NEWLINE,
"unicode", &vc_unicode,