|
@@ -17,6 +17,7 @@ namespace Usm {
|
|
|
public string sbin { get; set; }
|
|
|
public string shared_state { get; set; }
|
|
|
public string sys_config { get; set; }
|
|
|
+ public string tags { get; set; }
|
|
|
|
|
|
public string usm_config_dir { get; set; }
|
|
|
|
|
@@ -35,6 +36,7 @@ namespace Usm {
|
|
|
Environment.set_variable("SBINDIR", sbin, true);
|
|
|
Environment.set_variable("SHAREDSTATEDIR", shared_state, true);
|
|
|
Environment.set_variable("SYSCONFIGDIR", sys_config, true);
|
|
|
+ Environment.set_variable("TAGSDIR", tags, true);
|
|
|
}
|
|
|
|
|
|
public string get_suggested_path(ResourceRef resource) {
|
|
@@ -46,9 +48,9 @@ namespace Usm {
|
|
|
case ResourceType.OPTIONAL:
|
|
|
return Path.build_filename(destination, "opt", resource.resource);
|
|
|
case Usm.ResourceType.RESOURCE:
|
|
|
- return Path.build_filename(destination, prefix, "share", resource.resource);
|
|
|
+ return Path.build_filename(destination, prefix, data, resource.resource);
|
|
|
case ResourceType.CONFIGURATION:
|
|
|
- return Path.build_filename(destination, "etc", resource.resource);
|
|
|
+ return Path.build_filename(destination, sys_config, resource.resource);
|
|
|
case Usm.ResourceType.BINARY:
|
|
|
return Path.build_filename(destination, prefix, bin, resource.resource);
|
|
|
case Usm.ResourceType.SUPER_BINARY:
|
|
@@ -77,11 +79,25 @@ namespace Usm {
|
|
|
return Path.build_filename(destination, prefix, "share", "gir-1.0", resource.resource);
|
|
|
case Usm.ResourceType.TYPELIB:
|
|
|
return Path.build_filename(destination, prefix, lib, "girepository-1.0", resource.resource);
|
|
|
+ case Usm.ResourceType.TAG:
|
|
|
+ return get_tag_file_path(resource.resource);
|
|
|
default:
|
|
|
assert_not_reached();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public string get_tag_file_path(string tag) {
|
|
|
+ var tag_path = tag.replace(".", "/");
|
|
|
+ tag_path += ".tag";
|
|
|
+
|
|
|
+ return Path.build_filename(destination, prefix, tags, tag_path);
|
|
|
+ }
|
|
|
+
|
|
|
+ public string get_tag_dir_path(string tag) {
|
|
|
+ var tag_path = tag.replace(".", "/");
|
|
|
+ return Path.build_filename(destination, prefix, tags, tag_path);
|
|
|
+ }
|
|
|
+
|
|
|
public Paths.defaults() {
|
|
|
destination = "/";
|
|
|
prefix = "/usr";
|
|
@@ -97,6 +113,7 @@ namespace Usm {
|
|
|
sbin = "sbin";
|
|
|
shared_state = "com";
|
|
|
sys_config = "etc";
|
|
|
+ tags = "share/usm-tags";
|
|
|
|
|
|
usm_config_dir = "/etc/usm";
|
|
|
}
|
|
@@ -118,6 +135,7 @@ namespace Usm {
|
|
|
sbin = Environment.get_variable("USM_SBINDIR") ?? defaults.sbin;
|
|
|
shared_state = Environment.get_variable("USM_SHAREDSTATEDIR") ?? defaults.shared_state;
|
|
|
sys_config = Environment.get_variable("USM_SYSCONFIGDIR") ?? defaults.sys_config;
|
|
|
+ tags = Environment.get_variable("USM_TAGSDIR") ?? defaults.tags;
|
|
|
|
|
|
usm_config_dir = Environment.get_variable("USM_CONFIGDIR") ?? defaults.usm_config_dir;
|
|
|
}
|