-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpm.spec.in
51 lines (42 loc) · 1.05 KB
/
rpm.spec.in
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
# -*- rpm-spec -*-
Summary: @CPACK_PACKAGE_SUMMARY@
Name: @CPACK_PACKAGE_NAME@
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_PACKAGE_RELEASE@
License: @CPACK_PACKAGE_LICENSE@
Group: @CPACK_PACKAGE_APP_GROUP@
Source: @CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gcc-c++
BuildRequires: cmake > 2.6
BuildRequires: make
BuildRequires: python-devel
Requires: python
%description
@CPACK_PACKAGE_SUMMARY@
%define prefix @CPACK_PACKAGING_INSTALL_PREFIX@
%define rpmprefix $RPM_BUILD_ROOT%{prefix}
%define srcdirname %{name}-%{version}
%prep
%setup -q -n %{srcdirname}
%build
cd ..
rm -rf build_tree
mkdir build_tree
cd build_tree
cmake -DCMAKE_INSTALL_PREFIX=%{rpmprefix} ../%{srcdirname}
make
%install
cd ../build_tree
make install
%clean
cd ..
rm -rf %{srcdirname}
rm -rf build_tree
%files
%defattr(-,root,root,-)
%{prefix}/include/@PROJECT_NAME@/*
%{prefix}/@INSTALL_LIB_DIR@/*
# %{prefix}/bin/*
# %{prefix}/etc/*
%changelog