don't hardcode /usr/share paths
Add a defines.mk file defining the standard default layout for installation (PREFIX, DATAROOTDIR, LIBDIR etc.). Add a $(JSDIR) variable and use env!("JSDIR") in place of the hardcoded /usr/share/javascript/proxmox-backup path. Have defines.mk include an *optional* local.mak to override JSDIR to www/ during local development. Add `make install` targets and remove debian/install. Note that service files are now in $libdir/proxmox-backup/ as there's usually no point in starting them from the command line, so /usr/sbin makes no sense. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -41,7 +41,7 @@ fn main() {
|
||||
}
|
||||
|
||||
let config = ApiConfig::new(
|
||||
"/usr/share/javascript/proxmox-backup", &ROUTER, RpcEnvironmentType::PRIVILEDGED);
|
||||
env!("PROXMOX_JSDIR"), &ROUTER, RpcEnvironmentType::PRIVILEDGED);
|
||||
|
||||
let rest_server = RestServer::new(config);
|
||||
|
||||
|
@ -32,7 +32,7 @@ fn main() {
|
||||
}
|
||||
|
||||
let mut config = ApiConfig::new(
|
||||
"/usr/share/javascript/proxmox-backup", &ROUTER, RpcEnvironmentType::PUBLIC);
|
||||
env!("PROXMOX_JSDIR"), &ROUTER, RpcEnvironmentType::PUBLIC);
|
||||
|
||||
// add default dirs which includes jquery and bootstrap
|
||||
// my $base = '/usr/share/libpve-http-server-perl';
|
||||
|
Reference in New Issue
Block a user