libropkg: implement package manager system directory initialisation
This commit is contained in:
30
libropkg/instance.h
Normal file
30
libropkg/instance.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _ROPKG_INSTANCE_H_
|
||||
#define _ROPKG_INSTANCE_H_
|
||||
|
||||
#include <blue/io/directory.h>
|
||||
|
||||
#define ROPKG_INSTANCE_DIRPATH_CONFIG "etc/ropkg"
|
||||
#define ROPKG_INSTANCE_DIRPATH_CACHE "var/cache/ropkg"
|
||||
#define ROPKG_INSTANCE_DIRPATH_DATABASE "var/lib/ropkg"
|
||||
|
||||
#define ROPKG_INSTANCE_DIRPATH_CONFIG_COLLECTION \
|
||||
ROPKG_INSTANCE_DIRPATH_CONFIG "/config"
|
||||
#define ROPKG_INSTANCE_DIRPATH_SOURCES ROPKG_INSTANCE_DIRPATH_CONFIG "/sources"
|
||||
#define ROPKG_INSTANCE_DIRPATH_AVAILABLE \
|
||||
ROPKG_INSTANCE_DIRPATH_DATABASE "/available.d"
|
||||
#define ROPKG_INSTANCE_DIRPATH_ARCHIVES ROPKG_INSTANCE_DIRPATH_CACHE "/archives"
|
||||
|
||||
#define ROPKG_INSTANCE_FILEPATH_INSTALLED \
|
||||
ROPKG_INSTANCE_DIRPATH_DATABASE "/installed"
|
||||
#define ROPKG_INSTANCE_FILEPATH_AVAILABLE \
|
||||
ROPKG_INSTANCE_DIRPATH_DATABASE "/available"
|
||||
|
||||
struct ropkg_instance {
|
||||
b_directory *inst_root;
|
||||
|
||||
b_directory *inst_dir_config;
|
||||
b_directory *inst_dir_cache;
|
||||
b_directory *inst_dir_database;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user