mirror of
https://github.com/containers/podman.git
synced 2025-09-10 15:46:07 +08:00
Merge pull request #4599 from raukadah/rpmbuild_without
Updates on making doc building optional
This commit is contained in:
@ -8,11 +8,11 @@ SHORT_COMMIT ?= $(shell git rev-parse --short=8 HEAD)
|
|||||||
srpm:
|
srpm:
|
||||||
mkdir -p $(topdir)
|
mkdir -p $(topdir)
|
||||||
sh $(current_dir)/prepare.sh
|
sh $(current_dir)/prepare.sh
|
||||||
rpmbuild -bs -D "dist %{nil}" -D "_sourcedir build/" -D "_srcrpmdir $(outdir)" -D "_topdir $(topdir)" --nodeps contrib/spec/podman.spec
|
rpmbuild -bs -D "dist %{nil}" -D "_sourcedir build/" -D "_srcrpmdir $(outdir)" -D "_topdir $(topdir)" --nodeps ${extra_arg:-""} contrib/spec/podman.spec
|
||||||
|
|
||||||
build_binary:
|
build_binary:
|
||||||
mkdir -p $(topdir)
|
mkdir -p $(topdir)
|
||||||
rpmbuild --rebuild -D "_rpmdir $(outdir)" -D "_topdir $(topdir)" $(outdir)/podman-*.git$(SHORT_COMMIT).src.rpm
|
rpmbuild --rebuild -D "_rpmdir $(outdir)" -D "_topdir $(topdir)" ${extra_arg:-""} $(outdir)/podman-*.git$(SHORT_COMMIT).src.rpm
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr rpms
|
rm -fr rpms
|
||||||
|
@ -22,7 +22,6 @@ declare -a PKGS=(device-mapper-devel \
|
|||||||
glib2-devel \
|
glib2-devel \
|
||||||
glibc-static \
|
glibc-static \
|
||||||
golang \
|
golang \
|
||||||
golang-github-cpuguy83-go-md2man \
|
|
||||||
gpgme-devel \
|
gpgme-devel \
|
||||||
libassuan-devel \
|
libassuan-devel \
|
||||||
libseccomp-devel \
|
libseccomp-devel \
|
||||||
@ -41,14 +40,19 @@ if [ $pkg_manager == "/usr/bin/dnf" ]; then
|
|||||||
PKGS+=(btrfs-progs-devel)
|
PKGS+=(btrfs-progs-devel)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# golang-github-cpuguy83-go-md2man is needed for building man pages
|
||||||
|
# It is not available by default in CentOS 8 making it optional
|
||||||
|
if [ -z "$extra_arg" ]; then
|
||||||
|
PKGS+=(golang-github-cpuguy83-go-md2man)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${PKGS[*]}
|
echo ${PKGS[*]}
|
||||||
$pkg_manager install -y ${PKGS[*]}
|
$pkg_manager install -y ${PKGS[*]}
|
||||||
|
|
||||||
make -f .copr/Makefile
|
make -f .copr/Makefile
|
||||||
rpmbuild --rebuild podman-*.src.rpm
|
rpmbuild --rebuild ${extra_arg:-""} podman-*.src.rpm
|
||||||
|
|
||||||
# Test to make sure the install of the binary works
|
# Test to make sure the install of the binary works
|
||||||
$pkg_manager -y install ~/rpmbuild/RPMS/x86_64/podman-*.x86_64.rpm
|
$pkg_manager -y install ~/rpmbuild/RPMS/x86_64/podman-*.x86_64.rpm
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
%global with_devel 0
|
%global with_devel 0
|
||||||
%global with_bundled 1
|
%global with_bundled 1
|
||||||
%global with_debug 1
|
|
||||||
%global with_check 0
|
%global with_check 0
|
||||||
%global with_unit_test 0
|
%global with_unit_test 0
|
||||||
%global with_doc 1
|
%bcond_without doc
|
||||||
|
%bcond_without debug
|
||||||
|
|
||||||
%if 0%{?fedora} >= 28
|
%if 0%{?fedora} >= 28
|
||||||
%bcond_without varlink
|
%bcond_without varlink
|
||||||
@ -11,7 +11,7 @@
|
|||||||
%bcond_with varlink
|
%bcond_with varlink
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_debug}
|
%if %{with debug}
|
||||||
%global _find_debuginfo_dwz_opts %{nil}
|
%global _find_debuginfo_dwz_opts %{nil}
|
||||||
%global _dwz_low_mem_die_limit 0
|
%global _dwz_low_mem_die_limit 0
|
||||||
%else
|
%else
|
||||||
@ -61,7 +61,7 @@ BuildRequires: glib2-devel
|
|||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
BuildRequires: glibc-static
|
BuildRequires: glibc-static
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
%if 0%{?with_doc}
|
%if %{with doc}
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: gpgme-devel
|
BuildRequires: gpgme-devel
|
||||||
@ -355,6 +355,15 @@ This package contains unit tests for project
|
|||||||
providing packages with %{import_path} prefix.
|
providing packages with %{import_path} prefix.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%package manpages
|
||||||
|
Summary: Man pages for the %{name} commands
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description manpages
|
||||||
|
Man pages for the %{name} commands
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -Sgit -n %{repo}-%{shortcommit0}
|
%autosetup -Sgit -n %{repo}-%{shortcommit0}
|
||||||
|
|
||||||
@ -363,7 +372,7 @@ tar zxf %{SOURCE1}
|
|||||||
|
|
||||||
sed -i 's/install.remote: podman-remote/install.remote:/' Makefile
|
sed -i 's/install.remote: podman-remote/install.remote:/' Makefile
|
||||||
sed -i 's/install.bin: podman/install.bin:/' Makefile
|
sed -i 's/install.bin: podman/install.bin:/' Makefile
|
||||||
%if 0%{?with_doc}
|
%if %{with doc}
|
||||||
sed -i 's/install.man: docs/install.man:/' Makefile
|
sed -i 's/install.man: docs/install.man:/' Makefile
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -379,7 +388,7 @@ export BUILDTAGS="varlink selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/
|
|||||||
|
|
||||||
GOPATH=$GOPATH go generate ./cmd/podman/varlink/...
|
GOPATH=$GOPATH go generate ./cmd/podman/varlink/...
|
||||||
|
|
||||||
%if 0%{?with_doc}
|
%if %{with doc}
|
||||||
BUILDTAGS=$BUILDTAGS make binaries docs
|
BUILDTAGS=$BUILDTAGS make binaries docs
|
||||||
%else
|
%else
|
||||||
BUILDTAGS=$BUILDTAGS make binaries
|
BUILDTAGS=$BUILDTAGS make binaries
|
||||||
@ -400,6 +409,7 @@ popd
|
|||||||
%install
|
%install
|
||||||
install -dp %{buildroot}%{_unitdir}
|
install -dp %{buildroot}%{_unitdir}
|
||||||
install -dp %{buildroot}%{_usr}/lib/systemd/user
|
install -dp %{buildroot}%{_usr}/lib/systemd/user
|
||||||
|
%if %{with doc}
|
||||||
PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
|
PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
|
||||||
install.bin \
|
install.bin \
|
||||||
install.remote \
|
install.remote \
|
||||||
@ -407,6 +417,14 @@ PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{build
|
|||||||
install.cni \
|
install.cni \
|
||||||
install.systemd \
|
install.systemd \
|
||||||
install.completions
|
install.completions
|
||||||
|
%else
|
||||||
|
PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
|
||||||
|
install.bin \
|
||||||
|
install.remote \
|
||||||
|
install.cni \
|
||||||
|
install.systemd \
|
||||||
|
install.completions
|
||||||
|
%endif
|
||||||
|
|
||||||
mv pkg/hooks/README.md pkg/hooks/README-hooks.md
|
mv pkg/hooks/README.md pkg/hooks/README-hooks.md
|
||||||
|
|
||||||
@ -489,10 +507,6 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%if 0%{?with_doc}
|
|
||||||
%{_mandir}/man1/*.1*
|
|
||||||
%{_mandir}/man5/*.5*
|
|
||||||
%endif
|
|
||||||
%{_datadir}/bash-completion/completions/*
|
%{_datadir}/bash-completion/completions/*
|
||||||
%{_datadir}/zsh/site-functions/*
|
%{_datadir}/zsh/site-functions/*
|
||||||
%{_libexecdir}/%{name}/conmon
|
%{_libexecdir}/%{name}/conmon
|
||||||
@ -522,6 +536,12 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
|
||||||
%{_bindir}/%{name}-remote
|
%{_bindir}/%{name}-remote
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%files manpages
|
||||||
|
%{_mandir}/man1/*.1*
|
||||||
|
%{_mandir}/man5/*.5*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Aug 4 2018 Dan Walsh <dwalsh@redhat.com> - 0.8.1-1.git6b4ab2a
|
* Sat Aug 4 2018 Dan Walsh <dwalsh@redhat.com> - 0.8.1-1.git6b4ab2a
|
||||||
- Bump to v0.8.1
|
- Bump to v0.8.1
|
||||||
|
Reference in New Issue
Block a user