From: Kevin Day Date: Thu, 1 Mar 2012 00:04:03 +0000 (-0600) Subject: Add Project: f_paths X-Git-Tag: 0.3.x~20 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e9f6e1a6916e61f0ac5dd118a04d77b0d2fd752f;p=fll Add Project: f_paths This was missed during the import. --- diff --git a/level_0/f_paths/c/filesystem_paths.h b/level_0/f_paths/c/filesystem_paths.h new file mode 100644 index 0000000..16302c1 --- /dev/null +++ b/level_0/f_paths/c/filesystem_paths.h @@ -0,0 +1,152 @@ +/* FLL - Level 0 + * Project: Paths + * Version: svn + * Licenses: lgplv2.1 + * Programmers: Kevin Day + * Documentation: + * + * Provide locations to all filesystem paths, for low level hardcoding + * + * FIXME: this is very outdated due to numerous structural changes while I was developing turtle kevux + */ +#ifndef _F_filesystem_paths_h +#define _F_filesystem_paths_h + +#ifdef __cplusplus +extern "C"{ +#endif + +// KFS Filesystem Paths +#ifdef _en_kevux_filesystem_paths_ + // disable the FHS default paths + #define _di_filesystem_paths_ + + // KFS Root Level + #define f_path_devices "/devices" + #define f_path_external "/external" + #define f_path_libraries "/libraries" + #define f_path_programs "/programs" + #define f_path_system "/system" + #define f_path_temporary "/temporary" + #define f_path_home "/home" + + // FHS Root Level + #define f_path_boot f_path_devices"/boot" + #define f_path_hardware f_path_devices"/devices" + #define f_path_processes f_path_devices"/processes" + #define f_path_systemfs f_path_devices"/systemfs" + + // Program Level + #define f_path_programs_public f_path_programs"/public" + #define f_path_programs_system f_path_programs"/system" + #define f_path_programs_remote f_path_programs"/remote" + #define f_path_programs_services f_path_programs"/services" + #define f_path_programs_toolchain f_path_programs"/toolchain" + #define f_path_programs_users f_path_programs"/users" + #define f_path_programs_susers f_path_programs"/users" + #define f_path_programs_boot f_path_boot"/programs" + #define f_path_programs_sboot f_path_boot"/programs" + + // Library Level + #define f_path_libraries_public f_path_libraries"/public" + #define f_path_libraries_system f_path_libraries"/system" + #define f_path_libraries_remote f_path_libraries"/remote" + #define f_path_libraries_services f_path_libraries"/services" + #define f_path_libraries_toolchain f_path_libraries"/toolchain" + #define f_path_libraries_users f_path_libraries"/users" + #define f_path_libraries_boot f_path_boot"/libraries" + + // Home Level + #define f_path_home_services f_path_home"/services" + #define f_path_home_share f_path_home"/share" + #define f_path_home_users f_path_home"/users" + #define f_path_home_websites f_path_home"/websites" + + // System Level + #define f_path_system_logs f_path_system"/logs" + #define f_path_system_settings f_path_system"/settings" + #define f_path_system_data f_path_system"/data" + #define f_path_system_variables f_path_system"/variables" // for backwards FHS support only, use of this directory is considered bad practice for KFS, use f_path_temporary_variables instead + + // Temporary Level + #define f_path_temporary_public f_path_temporary"/public" + #define f_path_temporary_services f_path_temporary"/services" + #define f_path_temporary_users f_path_temporary"/users" + #define f_path_temporary_variables f_path_temporary"/variables" + + // Private User Directories + #define f_path_user_downloads "~/downloads" + #define f_path_user_desktop "~/desktop" + #define f_path_user_private "~/.private" + #define f_path_user_settings "~/.settings" + #define f_path_user_data "~/.data" +#endif //_en_kevux_filesystem_paths_ + +// FHS Filesystem Paths +#ifndef _di_filesystem_paths_ + // KFS Root Level + #define f_path_devices "/" + #define f_path_external "/mnt" + #define f_path_libraries "/" + #define f_path_programs "/" + #define f_path_system "/" + #define f_path_temporary "/" + #define f_path_home "/home" + + // FHS Root Level + #define f_path_boot "/boot" + #define f_path_hardware "/dev" + #define f_path_processes "/proc" + #define f_path_systemfs "/sysfs" + + // Program Level + #define f_path_programs_public "/usr/bin" + #define f_path_programs_system "/usr/sbin" + #define f_path_programs_remote "/usr/bin" + #define f_path_programs_services "/usr/sbin" + #define f_path_programs_toolchain "/usr/bin" + #define f_path_programs_users "/usr/local/bin" + #define f_path_programs_susers "/usr/local/sbin" + #define f_path_programs_boot "/bin" + #define f_path_programs_sboot "/sbin" + + // Library Level + #define f_path_libraries_public "/usr/lib" + #define f_path_libraries_system "/usr/lib" + #define f_path_libraries_remote "/usr/lib" + #define f_path_libraries_services "/usr/lib" + #define f_path_libraries_toolchain "/usr/lib" + #define f_path_libraries_users "/usr/local/lib" + #define f_path_libraries_boot "/lib" + + // Home Level + #define f_path_home_services "/srv" + #define f_path_home_share "/" + #define f_path_home_users f_path_home + #define f_path_home_websites "/srv/www" + + // System Level + #define f_path_system_logs "/var/log" + #define f_path_system_settings "/etc" + #define f_path_system_data "/usr/share" + #define f_path_system_variables "/var" + + // Temporary Level + #define f_path_temporary_public "/tmp" + #define f_path_temporary_services "/tmp" + #define f_path_temporary_users "/tmp" + #define f_path_temporary_variables "/var/tmp" + + // Private User Directories + #define f_path_user_downloads "~" + #define f_path_user_desktop "~/Desktop" + #define f_path_user_private "~" + #define f_path_user_settings "~" + #define f_path_user_data "~" +#endif // _di_filesystem_paths_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_filesystem_paths_h diff --git a/level_0/f_paths/c/fll_paths.h b/level_0/f_paths/c/fll_paths.h new file mode 100644 index 0000000..51bfee4 --- /dev/null +++ b/level_0/f_paths/c/fll_paths.h @@ -0,0 +1,50 @@ +/* FLL - Level 0 + * Project: Paths + * Version: svn + * Licenses: lgplv2.1 + * Programmers: Kevin Day + * Documentation: + * + * Provide locations to all fll-specific paths + * It is planned to have this file auto-generated from a single /etc/fll file such that one file can be used for all supported languages. + * + * FIXME: this is very outdated due to numerous structural changes while I was developing turtle kevux + */ +#ifndef _F_fll_paths_h +#define _F_fll_paths_h + +#include + +#ifdef __cplusplus +extern "C"{ +#endif + +// TODO: don't forget to completely restructure the paths layout before 0.1.0 is released +#ifndef _di_fll_paths_ + #define f_path_fll_base f_path_system_settings "/fll" // directory + #define f_path_fll_settings "settings" // directory + #define f_path_fll_packages "packages" // directory + #define f_path_fll_patches "patches" // directory + #define f_path_fll_archive "archive" // directory + #define f_path_fll_groups "groups" // directory + #define f_path_fll_licenses "licenses" // directory + #define f_path_fll_global "global" // file + #define f_path_fll_paths "paths" // file + #define f_path_fll_listing "listing" // file + #define f_path_fll_headers "headers" // file + #define f_path_fll_libraries "libraries" // file + #define f_path_fll_programs "programs" // file + #define f_path_fll_scripts "scripts" // file + #define f_path_fll_fakefile "fakefile" // file +#endif // _di_fll_paths_ + +#ifndef _di_fll_file_endings_ + #define f_fll_file_ending_package ".pkg" + #define f_fll_file_ending_patch ".patch" +#endif // _di_fll_file_endings_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_fll_paths_h diff --git a/level_0/f_paths/data/build/settings b/level_0/f_paths/data/build/settings new file mode 100644 index 0000000..c96fd67 --- /dev/null +++ b/level_0/f_paths/data/build/settings @@ -0,0 +1,21 @@ +# fss-0000 + +project_name f_paths +project_level 0 + +version_major 0 +version_minor 2 +version_micro 0 + +build_compiler gcc +build_libraries +build_sources_library +build_sources_program +build_sources_headers fll_paths.h filesystem_paths.h +build_shared yes + +flags_all -z now +flags_shared +flags_static +flags_library -fPIC +flags_program -fPIE