forked from ryancrum/bifrost
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherlang-bifrost.spec
86 lines (65 loc) · 2.88 KB
/
erlang-bifrost.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
%global realname bifrost
%global upstream madrat-
%global debug_package %{nil}
%global git_url https://github.com/%{upstream}/%{realname}
%if 0%{!?git_tag:1}
%global git_tag HEAD
%endif
%global git_log %(GITDIR=`mktemp -d` && git clone -q %{git_url} $GITDIR && pushd $GITDIR >/dev/null && git reset -q --hard %{git_tag} && LOG=$(git log -n 1 --format='%h %H %ct') && popd >/dev/null && rm -Rf $GITDIR >/dev/null && echo $LOG)
%if "%{git_log}" == ""
Can not get log info for %{git_tag}
%endif
%global git_tag %(echo "%{git_log}" | cut -d ' ' -f1)
%global git_commit %(echo "%{git_log}" | cut -d ' ' -f2)
%global git_commit_time %(echo "%{git_log}" | cut -d ' ' -f3 | date --utc -d - +'%Y%m%d')
%{echo:Building commit %{git_commit}...
}
%global patchnumber 0
%bcond_without check
Name: erlang-%{realname}
Version: 0.0.0
Release: %{git_commit_time}.%{patchnumber}.%{git_tag}%{?dist}
Summary: Pluggable Erlang FTP Server
Group: Development/Libraries
License: MIT
URL: %{git_url}
BuildRequires: erlang-rebar
%{!?_without_check:BuildRequires: erlang-meck >= 0.8.1}
Requires: erlang-compiler%{?_isa}
Requires: erlang-crypto%{?_isa}
Requires: erlang-erts%{?_isa} >= R16
Requires: erlang-inets%{?_isa}
Requires: erlang-kernel%{?_isa}
Requires: erlang-ssl%{?_isa}
Requires: erlang-stdlib%{?_isa} >= R16
Requires: erlang-syntax_tools%{?_isa}
Provides: %{realname} = %{version}-%{release}
%description
Bifrost is an implementation of the FTP protocol that enables you to create an FTP server without worrying about the protocol details. Many legacy business systems still use FTP heavily for data transmission, and Bifrost can help bridge the gap between them and modern distributed systems. For example, using Bifrost you can pretty easily write an FTP server that serves files from Amazon's S3 and a Postgres SQL server instead of a filesystem.
Bifrost also includes FTP/SSL support, if you supply a certificate.
This version is fork of https://github.com/thorstadt/bifrost
%prep
%setup -n %{upstream}-%{realname}-%{version} -T -c
git clone -q %{git_url} `pwd`
git reset -q --hard %{git_tag}
%{?_without_check:sed -rne '/meck/!p' -i.meck rebar.config}
%build
make
%install
install -D -m 644 ebin/%{realname}.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
install -m 644 ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/
install -D -m 644 include/bifrost.hrl $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/include/bifrost.hrl
%check
%if %{with check}
make test
%endif
%files
%doc LICENSE README.md sample
%dir %{_libdir}/erlang/lib/%{realname}-%{version}
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/include
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*
%{_libdir}/erlang/lib/%{realname}-%{version}/include/bifrost.hrl
%changelog
* Thu Nov 13 2014 madrat- 0.0.0
- Initial release