mirror of
https://git.proxmox.com/git/proxmox-mail-forward
synced 2025-04-28 09:56:46 +00:00

A previous commit removed the part which sets the bit.
Without the bit we cannot read the notification config, because
Postfix invokes forwarding binaries as 'nobody'.
Fixes: 32d813ce44
("build: properly use cargo wrapper")
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
72 lines
1.5 KiB
Makefile
72 lines
1.5 KiB
Makefile
include /usr/share/dpkg/pkg-info.mk
|
|
include /usr/share/dpkg/architecture.mk
|
|
|
|
PACKAGE=proxmox-mail-forward
|
|
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
|
|
|
|
DSC=rust-$(PACKAGE)_$(DEB_VERSION_UPSTREAM).dsc
|
|
DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
|
|
DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
|
|
|
|
DEBS=$(DEB) $(DBG_DEB)
|
|
|
|
ifeq ($(BUILD_MODE), release)
|
|
CARGO_BUILD_ARGS += --release
|
|
COMPILEDIR := target/release
|
|
else
|
|
COMPILEDIR := target/debug
|
|
endif
|
|
|
|
CARGO ?= cargo
|
|
|
|
$(BUILDDIR):
|
|
rm -rf $@ $@.tmp && mkdir $@.tmp
|
|
cp -a debian Cargo.toml src Makefile .cargo $@.tmp
|
|
rm -f $@.tmp/Cargo.lock
|
|
find $@.tmp/debian -name "*.hint" -delete
|
|
mv $@.tmp $@
|
|
|
|
.PHONY: deb dsc
|
|
$(DEBS): deb
|
|
deb: $(BUILDDIR)
|
|
cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
|
|
lintian $(DEBS)
|
|
|
|
dsc: clean
|
|
$(MAKE) $(DSC)
|
|
lintian $(DSC)
|
|
|
|
$(DSC): $(BUILDDIR)
|
|
cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
|
|
|
|
sbuild: $(DSC)
|
|
sbuild $<
|
|
|
|
.PHONY: dinstall
|
|
dinstall: $(DEBS)
|
|
dpkg -i $(DEBS)
|
|
|
|
.PHONY: cargo-build
|
|
cargo-build:
|
|
$(CARGO) build $(CARGO_BUILD_ARGS) \
|
|
--package proxmox-mail-forward \
|
|
--bin proxmox-mail-forward
|
|
|
|
install: cargo-build
|
|
install -dm755 $(DESTDIR)/usr/bin
|
|
$(CARGO) install
|
|
chmod u+s $(DESTDIR)/usr/bin/$(PACKAGE)
|
|
|
|
.PHONY: upload
|
|
upload: $(DEBS)
|
|
tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com -- upload --product "pve,pbs" --dist $(DEB_DISTRIBUTION) --arch $(DEB_HOST_ARCH)
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
cargo clean
|
|
rm -rf *.deb *.dsc *.buildinfo *.changes *.build rust-$(PACKAGE)*.tar.* $(PACKAGE)-[0-9]*/
|
|
find . -name '*~' -exec rm {} ';'
|