2 # Build FusionForge .rpm packages
4 # Copyright (C) 2014 Inria (Sylvain Beucler)
6 # This file is part of FusionForge. FusionForge is free software;
7 # you can redistribute it and/or modify it under the terms of the
8 # GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the Licence, or (at your option)
12 # FusionForge is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with FusionForge; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 # Install build dependencies
25 yum install -y gettext tar bzip2 rpm-build createrepo
26 yum install -y php-cli # rpm/gen_spec.sh
29 cd /usr/src/fusionforge/src/
30 version="$(make version)"
31 snapshot="+$(date +%Y%m%d%H%M)"
32 rpm/gen_spec.sh $version $snapshot
34 mkdir -p ../build/SOURCES/ ../build/SPECS/
35 mv fusionforge-$(make version).tar.bz2 ../build/SOURCES/fusionforge-$version$snapshot.tar.bz2
36 chown -h root: ../build/SOURCES/fusionforge-$version$snapshot.tar.bz2
37 cp fusionforge.spec ../build/SPECS/
38 rpmbuild ../build/SPECS/fusionforge.spec --define "_topdir $(pwd)/../build" -ba
40 (cd ../build/RPMS/ && createrepo .)
41 cat <<EOF > /etc/yum.repos.d/local.repo
44 baseurl=file:///usr/src/fusionforge/build/RPMS/