void jb_package_init (void) { JBVariableGroup *lm_features_group; /* by default, use the GNOME prefix */ jb_set_prefix_from_program("gnome-open"); /* * At the time of this writing, gob2 2.0.16 is not yet * released. What is required is gob2 2.0.15 + my patches (see the * gob mailing list), which should eventually become gob2 2.0.16. */ jb_variable_set_string("gob2-minversion", "2.0.16"); lm_features_group = jb_variable_add_group("Link Monitor Applet features"); jb_variable_add_bool("ipv6", "enable IPv6 support", lm_features_group, JB_VARIABLE_C_DEFINE, TRUE); jb_variable_add_bool("geoip", "enable GeoIP support", lm_features_group, JB_VARIABLE_C_DEFINE, TRUE); jb_variable_add_bool("compile-warnings", NULL, NULL, 0, FALSE); jb_variable_add_bool("debug", NULL, NULL, 0, TRUE); jb_variable_add_bool("suid-root", NULL, NULL, 0, TRUE); }
static void gconf_init (void) { jb_register_program("gconftool-2", 0); jb_variable_add_string("gconf-config-source", "GConf configuration source address", jb_variable_group_installation_options, 0, "autodetect"); jb_variable_add_string("gconf-schemas-dir", "GConf schemas installation directory", jb_variable_group_installation_options, 0, "$sysconfdir/gconf/schemas"); jb_variable_add_bool("install-gconf-schemas", "install GConf schemas", jb_variable_group_installation_options, 0, TRUE); }
void jb_main (int argc, char **argv, const char *package, const char *version, const char *human_package, const JBFeature **features, int num_features) { setlocale(LC_ALL, ""); g_log_set_fatal_mask(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL); g_type_init(); jb_topsrcdir = g_get_current_dir(); jb_set_log_file("build/jb.log"); jb_variable_init(); jb_compile_options = jb_compile_options_new("package"); jb_feature_set_list(features, num_features); /* these flags are needed by the JB GOB2 build mechanism */ jb_compile_options_add_gob2flags(jb_compile_options, "--always-private-header --no-touch"); jb_variable_set_string("package", package); jb_variable_set_string("version", version); jb_variable_set_string("human-package", human_package); jb_variable_add_string("cc", "C compiler command", jb_variable_group_compiler_options, 0, "cc"); jb_variable_add_string("cflags", "C compiler flags", jb_variable_group_compiler_options, 0, "-O2"); jb_variable_add_string("cppflags", "C preprocessor flags", jb_variable_group_compiler_options, 0, NULL); jb_variable_add_string("ldflags", "C linker flags", jb_variable_group_compiler_options, 0, NULL); jb_variable_add_string("libs", "C -l flags", jb_variable_group_compiler_options, 0, NULL); jb_variable_add_bool("cc-dependency-tracking", "enable C compiler dependency tracking", jb_variable_group_compiler_options, 0, TRUE); jb_variable_add_string("destdir", "destination directory", jb_variable_group_installation_options, 0, NULL); jb_variable_add_string("prefix", "installation prefix", jb_variable_group_installation_options, 0, "/usr/local"); jb_variable_add_string("bindir", "user executables directory", jb_variable_group_installation_options, 0, "$prefix/bin"); jb_variable_add_string("libdir", "shared libraries directory", jb_variable_group_installation_options, 0, "$prefix/lib"); jb_variable_add_string("libexecdir", "private executables directory", jb_variable_group_installation_options, 0, "$prefix/libexec"); jb_variable_add_string("datadir", "read-only architecture-independent data directory", jb_variable_group_installation_options, 0, "$prefix/share"); jb_variable_add_string("sysconfdir", "per-machine configuration directory", jb_variable_group_installation_options, 0, "$prefix/etc"); jb_variable_add_string("localstatedir", "per-machine state directory", jb_variable_group_installation_options, 0, "$prefix/var"); jb_variable_set_string("pkglibdir", "$libdir/$package"); jb_variable_set_string("pkgdatadir", "$datadir/$package"); jb_variable_set_string("pkgsysconfdir", "$sysconfdir/$package"); jb_variable_add_mode("data-mode", "data file permissions (octal)", jb_variable_group_installation_options, 0, 0644); jb_variable_add_string("data-owner", "data file owner", jb_variable_group_installation_options, 0, NULL); jb_variable_add_string("data-group", "data file group", jb_variable_group_installation_options, 0, NULL); jb_variable_add_mode("program-mode", "program file permissions (octal)", jb_variable_group_installation_options, 0, 0755); jb_variable_add_string("program-owner", "program file owner", jb_variable_group_installation_options, 0, NULL); jb_variable_add_string("program-group", "program file group", jb_variable_group_installation_options, 0, NULL); jb_variable_add_mode("library-mode", "library file permissions (octal)", jb_variable_group_installation_options, 0, 0644); jb_variable_add_string("library-owner", "library file owner", jb_variable_group_installation_options, 0, NULL); jb_variable_add_string("library-group", "library file group", jb_variable_group_installation_options, 0, NULL); jb_feature_init(); jb_package_init(); parse_args(argc, argv); }