-
Notifications
You must be signed in to change notification settings - Fork 2
/
libmaxminddb.spec
76 lines (59 loc) · 1.4 KB
/
libmaxminddb.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
%if ! 0%{?dist:1}
%define dist .el6
%endif
%define checkoutName %{name}-%{version}-%{_build_arch}-%{suffix: %{dist}}
%define source https://github.com/maxmind/libmaxminddb.git
Name: libmaxminddb
Version: 1.0
Release: 1%{?dist}
Summary: libmaxminddb library
Group: MaxMind
License: Proprietary
URL: https://www.maxmind.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_build_arch}-root-%(%{__id_u} -n)
BuildRequires: git
%description
This provides the MaxMind GeoIP library funtions.
%prep
#prep
rm -rf "%{checkoutName}"
src="%{source}"
if [[ "${src:0:7}" = "file://" ]] ; then :
cp -R "${src:7}" "%{checkoutName}"
else
git clone --recursive "%{source}" "%{checkoutName}"
cd "%{checkoutName}"
fi
%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
./bootstrap
#cd t
#rm -rf libtap
#git clone git://github.com/zorgnax/libtap.git libtap
#cd ..
%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/*
%doc
%changelog