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:
10
debian/install
vendored
10
debian/install
vendored
@ -1,8 +1,2 @@
|
||||
target/release/proxmox-backup-api /usr/sbin
|
||||
target/release/proxmox-backup-proxy /usr/bin
|
||||
target/release/proxmox-backup-manager /usr/sbin
|
||||
target/release/proxmox-backup-client /usr/sbin
|
||||
target/release/catar /usr/sbin
|
||||
www/images/logo-128.png /usr/share/javascript/proxmox-backup/images/
|
||||
www/images/proxmox_logo.png /usr/share/javascript/proxmox-backup/images/
|
||||
www/js/proxmox-backup-gui.js /usr/share/javascript/proxmox-backup/js/
|
||||
etc/proxmox-backup.service /lib/systemd/system/
|
||||
etc/proxmox-backup-proxy.service /lib/systemd/system/
|
||||
|
16
debian/proxmox-backup-proxy.service
vendored
16
debian/proxmox-backup-proxy.service
vendored
@ -1,16 +0,0 @@
|
||||
[Unit]
|
||||
Description=Proxmox API Proxy Server
|
||||
ConditionPathExists=/usr/bin/proxmox-backup-proxy
|
||||
Wants=proxmox-backup.service
|
||||
After=syslog.service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
Group=www-data
|
||||
ExecStart=/usr/bin/proxmox-backup-proxy start
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
13
debian/proxmox-backup.service
vendored
13
debian/proxmox-backup.service
vendored
@ -1,13 +0,0 @@
|
||||
[Unit]
|
||||
Description=Proxmox API Test Server
|
||||
ConditionPathExists=/usr/sbin/proxmox-backup-api
|
||||
After=syslog.service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/proxmox-backup-api start
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -7,6 +7,8 @@
|
||||
%:
|
||||
dh $@ --with=systemd --with=bash-completion
|
||||
|
||||
override_dh_autobuild:
|
||||
make PROXY_USER=www-data
|
||||
|
||||
override_dh_installinit:
|
||||
dh_installinit
|
||||
|
Reference in New Issue
Block a user