Skip to content
Snippets Groups Projects
Commit cd53fca4 authored by Pete Fritchman's avatar Pete Fritchman Committed by Lloyd Hilaiel
Browse files

rpmbuild script & spec file to produce a browserid-server RPM (closes #478)


Signed-off-by: default avatarLloyd Hilaiel <lloyd@hilaiel.com>
parent c2f085a1
No related branches found
No related tags found
No related merge requests found
%define _rootdir /opt/browserid
Name: browserid-server
Version: 0.2011.10.13
Release: 1%{?dist}
Summary: BrowserID server
Packager: Pete Fritchman <petef@mozilla.com>
Group: Development/Libraries
License: MPL 1.1+/GPL 2.0+/LGPL 2.1+
URL: https://github.com/mozilla/browserid
Source0: %{name}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
AutoReqProv: no
Requires: openssl nodejs
BuildRequires: gcc-c++ git jre make npm openssl-devel
%description
browserid server & web home for browserid.org
%prep
%setup -q -n browserid
%build
npm install
export PATH=$PWD/node_modules/.bin:$PATH
(cd browserid && ./compress.sh)
git log -1 --oneline > browserid/static/ver.txt
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_rootdir}
for f in browserid libs node_modules verifier *.json *.js; do
cp -rp $f %{buildroot}%{_rootdir}/$dir
done
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_rootdir}
%changelog
* Tue Oct 18 2011 Pete Fritchman <petef@mozilla.com>
- Initial version
#!/bin/bash
set -e
progname=$(basename $0)
cd $(dirname $0) # top level of the checkout
curdir=$(basename $PWD)
if [ "$curdir" != "browserid" ]; then
echo "$progname: git checkout must be in a dir named 'browserid'" >&2
exit 1
fi
mkdir -p rpmbuild/SOURCES rpmbuild/SPECS
rm -rf rpmbuild/RPMS
tar -C .. --exclude rpmbuild -czf \
$PWD/rpmbuild/SOURCES/browserid-server.tar.gz browserid
set +e
rpmbuild --define "_topdir $PWD/rpmbuild" -ba browserid.spec
rc=$?
if [ $rc -eq 0 ]; then
ls -l $PWD/rpmbuild/RPMS/*/*.rpm
else
echo "$progname: failed to build browserid RPM (rpmbuild rc=$rc)" >&2
fi
exit $rc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment