mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Build: add make rpms target and convenience script makerpms.sh
make rpms and ./makerpms.sh will produce the same RPM packages. The advantage of makerpms.sh is that it will take care of initial autoreconf & configure phases as needed. rpm-build-4.13.0-1.fc24.x86_64 broke parallel build of RPMs. If you get error INTERNAL: Exiting with 1 jobserver tokens available; should be 8! undefine the MAKEFLAGS variable and do not specify neither -j nor -l. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
75a944e980
commit
fee9bbd85a
@ -13,4 +13,4 @@ script:
|
||||
- >
|
||||
docker run -v $PWD:/freeipa -w /freeipa
|
||||
martbab/freeipa-fedora-builder:${TRAVIS_BRANCH}-latest
|
||||
/bin/bash -c 'dnf builddep -y -D "with_lint 1" --spec freeipa.spec.in && make rpms'
|
||||
/bin/bash -c 'dnf builddep -y -D "with_lint 1" --spec freeipa.spec.in && ./makerpms.sh'
|
||||
|
10
BUILD.txt
10
BUILD.txt
@ -32,14 +32,20 @@ Building
|
||||
--------
|
||||
|
||||
From the root of the source tree run:
|
||||
$ make rpms
|
||||
$ ./makerpms.sh
|
||||
|
||||
The resulting rpm packages are in dist/rpms:
|
||||
|
||||
# yum --nogpgcheck localinstall dist/rpms/*
|
||||
# ipa-server-install
|
||||
|
||||
It may be possible to do a simple make all install but this has not been
|
||||
You might tweak the build and run steps separatelly:
|
||||
$ autoreconf -i
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
It may be possible to do a simple make install but this has not been
|
||||
well-tested. Additional work is done in pre/post install scripts in the ipa
|
||||
spec file.
|
||||
|
||||
|
20
Makefile.am
20
Makefile.am
@ -24,3 +24,23 @@ EXTRA_DIST = .mailmap \
|
||||
doc \
|
||||
pylintrc \
|
||||
pytest.ini
|
||||
|
||||
# convenience targets for RPM build
|
||||
RPMBUILD ?= $(abs_builddir)/rpmbuild
|
||||
TARBALL = $(PACKAGE)-$(VERSION).tar.gz
|
||||
rpmroot:
|
||||
mkdir -p $(RPMBUILD)/BUILD
|
||||
mkdir -p $(RPMBUILD)/RPMS
|
||||
mkdir -p $(RPMBUILD)/SOURCES
|
||||
mkdir -p $(RPMBUILD)/SPECS
|
||||
mkdir -p $(RPMBUILD)/SRPMS
|
||||
|
||||
rpmdistdir:
|
||||
mkdir -p $(top_builddir)/dist/rpms
|
||||
mkdir -p $(top_builddir)/dist/srpms
|
||||
|
||||
rpms: dist-gzip rpmroot rpmdistdir
|
||||
cp $(top_builddir)/$(TARBALL) $(RPMBUILD)/SOURCES/
|
||||
rpmbuild --define "_topdir $(RPMBUILD)" -ba $(top_builddir)/$(PACKAGE).spec
|
||||
cp $(RPMBUILD)/RPMS/*/*.rpm $(top_builddir)/dist/rpms/
|
||||
cp $(RPMBUILD)/SRPMS/*.src.rpm $(top_builddir)/dist/srpms/
|
||||
|
10
makerpms.sh
Executable file
10
makerpms.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/bash
|
||||
set -o errexit
|
||||
|
||||
pushd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
test ! -x "configure" && autoreconf -i
|
||||
test ! -f "Makefile" && ./configure "$@"
|
||||
make rpms
|
||||
|
||||
popd
|
Loading…
Reference in New Issue
Block a user