-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First cut at better build and install #106
- Loading branch information
1 parent
3f39c3a
commit bf4551e
Showing
7 changed files
with
111 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,6 @@ staticfiles | |
|
||
# Build by-products | ||
/esmond-*.rpm | ||
|
||
# Editor droppings | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Makefile for esmond | ||
# | ||
# (Doesn't really build anything, it's just here for the clean.) | ||
# | ||
|
||
default: | ||
@echo "Nothing to do here." | ||
|
||
|
||
TO_CLEAN += \ | ||
bin \ | ||
configure_esmond \ | ||
esmond.egg-info \ | ||
include \ | ||
lib \ | ||
lib64 \ | ||
pip-selfcheck.json \ | ||
staticfiles \ | ||
tsdb-data \ | ||
vagrant-data \ | ||
*.rpm | ||
|
||
FILE_MODE=644 | ||
TO_CHMOD += \ | ||
util/gen_django_secret_key.py \ | ||
util/migrate_tastypie_keys.py \ | ||
util/ps_remove_data.conf \ | ||
util/ps_remove_data.py | ||
|
||
clean: | ||
chmod $(FILE_MODE) $(TO_CHMOD) | ||
rm -rf $(TO_CLEAN) *~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/sh | ||
|
||
|
||
echo | ||
echo Building Esmond | ||
echo | ||
|
||
set -e | ||
|
||
yum -y install git rpm-build | ||
|
||
# TODO: See if there's a way to get this location from Vagrant | ||
WORK_DIR=/tmp/esmond-build | ||
rm -rf "${WORK_DIR}" | ||
mkdir -p "${WORK_DIR}" | ||
rsync --archive --delete ./ "${WORK_DIR}" | ||
|
||
RPMBUILD="${HOME}/rpmbuild" | ||
rm -rf "${RPMBUILD}" | ||
for DIR in SOURCES SRPMS | ||
do | ||
mkdir -p "${RPMBUILD}/${DIR}" | ||
done | ||
|
||
OLD_DIR="${PWD}" | ||
cd "${WORK_DIR}" | ||
|
||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
RPMVERSION=$(rpmspec -q --qf "%{Version}\n" rpm/esmond.spec | head -1) | ||
|
||
|
||
TARBALL="${RPMBUILD}/SOURCES/esmond-${RPMVERSION}.tar.gz" | ||
rm -rf "${TARBALL}" | ||
|
||
TAR_BUILD=/tmp/esmond-tar-build | ||
TAR_ESMOND="${TAR_BUILD}/esmond-${RPMVERSION}" | ||
rm -rf "${TAR_BUILD}" | ||
mkdir -p "${TAR_ESMOND}" | ||
rsync \ | ||
--exclude "*~" \ | ||
--exclude "*.rpm" \ | ||
--archive --delete ./ "${TAR_ESMOND}" | ||
(cd "${TAR_BUILD}" && tar czf "${TARBALL}" .) | ||
rm -rf "${TAR_BUILD}" | ||
|
||
rpmbuild -bs rpm/esmond.spec | ||
|
||
yum-builddep -y ${RPMBUILD}/SRPMS/*.src.rpm | ||
|
||
rpmbuild -ba rpm/esmond.spec | ||
|
||
cp ${RPMBUILD}/RPMS/$(uname -m)/* "${OLD_DIR}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.