-
Notifications
You must be signed in to change notification settings - Fork 2
/
varnish-cache.spec
64 lines (51 loc) · 1.3 KB
/
varnish-cache.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
%define checkoutName %{name}-%{version}-%{_build_arch}-%{suffix: %{dist}}
%define source https://github.com/varnish/Varnish-Cache.git
Name: varnish-cache
Version: 3.0
Release: 5%{?dist}
Summary: A varnish module to do IP lookup using libmaxminddb
Group: Varnish.org
License: Proprietary
URL: https://github.com/varnish/Varnish-Cache
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_build_arch}-root-%(%{__id_u} -n)
BuildRequires: git
%description
This provides varnish cache.
%prep
#prep
rm -rf "%{checkoutName}"
git clone "%{source}" "%{checkoutName}"
cd "%{_builddir}/%{checkoutName}"
git branch 3.0 -t origin/3.0
git checkout 3.0
git checkout 1a89b1f75895bbf874e83cfc6f6123737a3fd76f
%build
#build
cd %{checkoutName}
mkdir buildinfo
echo "%{source}" >> buildinfo/source.txt
git branch > buildinfo/branch.txt
git status > buildinfo/status.txt
git remote --verbose show -n origin > buildinfo/origin.txt
git log --max-count=1 --pretty=fuller > buildinfo/log.txt
./autogen.sh
%configure
make %{?_smp_mflags}
%install
#install
cd %{checkoutName}
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%clean
#clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
rm -rf %{checkoutName}
%files
%defattr(-,root,root,-)
/usr/*
/etc/*
%doc
%changelog