summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pkg/deb/Makefile3
-rw-r--r--pkg/deb/debian/dirs1
-rw-r--r--pkg/deb/debian/rules.in3
-rw-r--r--pkg/rpm/Makefile3
-rw-r--r--pkg/rpm/unit.spec.in7
5 files changed, 15 insertions, 2 deletions
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index fc631c6d..c7c36bf7 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -199,7 +199,8 @@ endif
debuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \
--transform "s#^#$(SRCDIR)/#" \
- LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
+ LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src \
+ test tools version go pkg/contrib docs/man/unitd.8.in
mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
diff --git a/pkg/deb/debian/dirs b/pkg/deb/debian/dirs
index 4a6618c8..2568bac1 100644
--- a/pkg/deb/debian/dirs
+++ b/pkg/deb/debian/dirs
@@ -1,3 +1,4 @@
+usr/bin
usr/sbin
usr/lib/unit
var/lib/unit
diff --git a/pkg/deb/debian/rules.in b/pkg/deb/debian/rules.in
index 01604e86..46286e83 100644
--- a/pkg/deb/debian/rules.in
+++ b/pkg/deb/debian/rules.in
@@ -32,6 +32,7 @@ config.env.%: njs
cp -Pa $(CURDIR)/configure $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/src $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/test $(BUILDDIR_$*)/
+ cp -Pa $(CURDIR)/tools $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/version $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/CHANGES $(BUILDDIR_$*)/
cp -Pa $(CURDIR)/LICENSE $(BUILDDIR_$*)/
@@ -112,6 +113,8 @@ install: build do.tests
dh_installlogrotate
cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR) make install
cd $(BUILDDIR_unit) && DESTDIR=$(INSTALLDIR_dev) make libunit-install
+ install -m 755 $(BUILDDIR_unit)/tools/unitc $(INSTALLDIR)/usr/bin/unitc
+ install -m 755 $(BUILDDIR_unit)/tools/setup-unit $(INSTALLDIR)/usr/bin/setup-unit
install -m 755 $(BUILDDIR_unit_debug)/build/sbin/unitd $(INSTALLDIR)/usr/sbin/unitd-debug
install -m 644 $(BUILDDIR_unit_debug)/build/lib/libunit.a $(INSTALLDIR_dev)/usr/lib/$(DEB_HOST_MULTIARCH)/libunit-debug.a
mkdir -p $(INSTALLDIR)/usr/share/doc/unit/examples
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 0aa6beb2..584f2d3a 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -192,7 +192,8 @@ endif
rpmbuild/SOURCES/unit-$(VERSION).tar.gz:
cd ../.. && tar -czf pkg/rpm/rpmbuild/SOURCES/unit-$(VERSION).tar.gz \
--transform "s#^#unit-$(VERSION)/#" \
- LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src test version go pkg/contrib docs/man/unitd.8.in
+ LICENSE NOTICE CHANGES README.md CONTRIBUTING.md configure auto src \
+ test tools version go pkg/contrib docs/man/unitd.8.in
unit: check-build-depends-unit rpmbuild/SPECS/unit.spec rpmbuild/SOURCES/unit-$(VERSION).tar.gz
@echo "===> Building $@ package" ; \
diff --git a/pkg/rpm/unit.spec.in b/pkg/rpm/unit.spec.in
index 0914e513..14a2ea00 100644
--- a/pkg/rpm/unit.spec.in
+++ b/pkg/rpm/unit.spec.in
@@ -103,6 +103,11 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
%{__rm} -rf %{buildroot}
%{__ln_s} build-nodebug build
DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install
+%{__mkdir} -p %{buildroot}%{_bindir}
+%{__install} -m755 %{bdir}/tools/unitc \
+ %{buildroot}%{_bindir}/unitc
+%{__install} -m755 %{bdir}/tools/setup-unit \
+ %{buildroot}%{_bindir}/setup-unit
%{__install} -m755 %{bdir}/build-debug/sbin/unitd \
%{buildroot}%{_sbindir}/unitd-debug
%{__install} -m644 %{bdir}/build-debug/lib/libunit.a \
@@ -197,6 +202,8 @@ BANNER
%files
%defattr(-,root,root,-)
+%attr(0755,root,root) %{_bindir}/unitc
+%attr(0755,root,root) %{_bindir}/setup-unit
%attr(0755,root,root) %{_sbindir}/unitd
%attr(0755,root,root) %{_sbindir}/unitd-debug
%{_unitdir}/unit.service