/
gae-flat-web.rpmspec
69 lines (52 loc) · 1.31 KB
/
gae-flat-web.rpmspec
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
# Build spec for n00bhacker
#
#
Name: gae-flat-web
Version: 0.0.1
Release: 1
Summary: to use Google AppEngine for static website serving
Group: OpenChaos
License: DemocraticOpenSource
Vendor: ABK
%define label 0.0.1
%define source git://github.com/abhishekkr/gae-flat-web.git
BuildRoot: %{_tmppath}/%{name}-%{label}-%{release}-root-%(%{__id_u} -n)
#BuildArch: x86_64
# disable automatic Requires and Provides detection, so multiple
# Rails apps using similar gems (such as nokogiri) can be installed
AutoReq: no
AutoProv: no
Provides: %{name}
Requires: python
# basic ruby dev environment
BuildRequires: git
%description
a Remote Administration Toolkit (or Trojan) for POSiX (Linux/Unix) system working as a HTTP Service
%define appsroot %{buildroot}/opt
%prep
rm -rf ./%{name}
git clone %{source} %{name}
pushd %{name}
#git reset --hard %{revision}
# put version.txt in public: it's used by the /health_check URL
echo %{label} > version.txt
popd
%clean
rm -rf %{buildroot}
%install
rm -rf %{buildroot}
mkdir -p %{appsroot}
mv %{name} %{appsroot}
pushd %{appsroot}
# remove unnecessary files from binary package
rm -rf %{name}/.git
popd
%post
rm -f /usr/bin/gaeflat
ln -sf /opt/%{name}/flat.py /usr/bin/gaeflat
chmod 0755 /usr/bin/gaeflat
%postun
rm -f /usr/bin/gaeflat
%files
#%defattr(-,root,root,-)
/opt/%{name}