Newer
Older
Pete Fritchman
committed
%define _rootdir /opt/browserid
Name: browserid-server
Release: 1%{?dist}_%{svnrev}
Pete Fritchman
committed
Summary: BrowserID server
Packager: Gene Wood <gene@mozilla.com>
Pete Fritchman
committed
Group: Development/Libraries
Pete Fritchman
committed
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 expat-devel
Pete Fritchman
committed
%description
Lloyd Hilaiel
committed
persona server & web home for persona.org
Pete Fritchman
committed
%prep
Pete Fritchman
committed
%setup -q -c -n browserid
Pete Fritchman
committed
%build
npm install
export PATH=$PWD/node_modules/.bin:$PATH
./locale/compile-mo.sh locale/
./locale/compile-json.sh locale/ resources/static/i18n/
Lloyd Hilaiel
committed
env CONFIG_FILES=$PWD/config/l10n-all.json scripts/compress
rm -r resources/static/build resources/static/test
echo "$GIT_REVISION" > resources/static/ver.txt
echo "locale svn r$SVN_REVISION" >> resources/static/ver.txt
Pete Fritchman
committed
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_rootdir}
Lloyd Hilaiel
committed
for f in bin lib locale node_modules resources scripts *.json; do
Pete Fritchman
committed
done
mkdir -p %{buildroot}%{_rootdir}/config
cp -p config/l10n-all.json %{buildroot}%{_rootdir}/config
cp -p config/l10n-prod.json %{buildroot}%{_rootdir}/config