xref: /freebsd/sys/contrib/openzfs/config/tgz.am (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1PHONY += tgz tgz-kmod tgz-utils tgz-local
2
3tgz-local:
4	@(if test "${HAVE_ALIEN}" = "no"; then \
5		echo -e "\n" \
6	"*** Required util ${ALIEN} missing.  Please install the\n" \
7	"*** package for your distribution which provides ${ALIEN},\n" \
8	"*** re-run configure, and try again.\n"; \
9		exit 1; \
10	fi)
11
12tgz-kmod: tgz-local rpm-kmod
13	name=${PACKAGE}; \
14	version=${VERSION}-${RELEASE}; \
15	arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \
16	pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \
17	fakeroot $(ALIEN) --scripts --to-tgz $$pkg1; \
18	$(RM) $$pkg1
19
20tgz-utils: tgz-local rpm-utils
21	name=${PACKAGE}; \
22	version=${VERSION}-${RELEASE}; \
23	arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
24	pkg1=$${name}-$${version}.$${arch}.rpm; \
25	pkg2=$${name}-devel-$${version}.$${arch}.rpm; \
26	pkg3=$${name}-test-$${version}.$${arch}.rpm; \
27	fakeroot $(ALIEN) --scripts --to-tgz $$pkg1 $$pkg2 $$pkg3; \
28	$(RM) $$pkg1 $$pkg2 $$pkg3
29
30tgz: tgz-kmod tgz-utils
31