--- /dev/null
+#!/bin/sh
+PROG=${0##*/}
+if [ $# = 2 ]; then
+ # for using same syntax as rpm own find-lang
+ RPM_BUILD_ROOT=$1
+ shift
+fi
+dir=$RPM_BUILD_ROOT/usr/lib/gitlab/locale
+langfile=$1
+tmp=$(mktemp) || exit 1
+rc=0
+
+find $dir -name '*.po' > $tmp
+
+echo '%defattr(644,root,root,755)' > $langfile
+while read file; do
+ lang=${file##*/}
+ lang=${lang%.po}
+ case "$lang" in
+ *-*)
+ echo >&2 "ERROR: Need mapping for $lang!"
+ rc=1
+ ;;
+ esac
+ echo "%lang($lang) ${file#$RPM_BUILD_ROOT}" >> $langfile
+done < $tmp
+
+if [ "$(grep -Ev '(^%defattr|^$)' $langfile | wc -l)" -le 0 ]; then
+ echo >&2 "$PROG: Error: international files not found!"
+ rc=1
+fi
+
+rm -f $tmp
+exit $rc
Summary: A Web interface to create projects and repositories, manage access and do code reviews
Name: gitlab-ce
Version: 10.1.1
-Release: 0.104
+Release: 0.105
License: MIT
Group: Applications/WWW
# md5 deliberately omitted until this package is useful
Source12: clean-vendor.sh
Source13: nginx.conf
Source14: gitconfig
+Source15: find-lang.sh
Patch1: pld.patch
URL: https://www.gitlab.com/gitlab-ce/
BuildRequires: cmake
Obsoletes: gitlab <= 8.1.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define find_lang sh %{SOURCE15} %{buildroot}
+
%define _noautoreqfiles redcloth_scan.jar primitives.jar
%define uname git
# cleanup unneccessary cruft (gem build files, etc)
sh -x %{SOURCE12} $RPM_BUILD_ROOT%{appdir}
+%find_lang %{name}.lang
+
# rpm cruft from repackaging
rm -f $RPM_BUILD_ROOT%{appdir}/debug*.list
%triggerun -- apache < 2.2.0, apache-base
%webapp_unregister httpd %{_webapp}
-%files
+%files -f %{name}.lang
%defattr(644,root,root,755)
%doc LICENSE
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/database.yml