Skip to content

Commit 379522c

Browse files
committed
Add spec file for rpm generation
The spec file gets processed by configure, the version will be filled in automatically. To generate an rpm make sure to install rpm-build, then "configure" as you would usually do, run "make dist", then process the generated tarball with rpmbuild: rpmbuild -tb tox-0.0.0.tar.gz Tested on Fedora 22.
1 parent b0ffef2 commit 379522c

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ toxcore-android-*
7171

7272
# cscope files list
7373
cscope.files
74+
75+
# rpm
76+
tox.spec

Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CLEANFILES = $(top_builddir)/libtoxcore.pc
1313
EXTRA_DIST = \
1414
README.md \
1515
libtoxcore.pc.in \
16+
tox.spec \
1617
dist-build/android-arm.sh \
1718
dist-build/android-armv7.sh \
1819
dist-build/android-x86.sh \

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes")
693693
AC_CONFIG_FILES([Makefile
694694
build/Makefile
695695
libtoxcore.pc
696+
tox.spec
696697
])
697698

698699
AM_COND_IF(BUILD_AV,

tox.spec.in

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Name: @PACKAGE_NAME@
2+
Version: @VERSION@
3+
Release: 1%{?dist}
4+
Summary: All-in-one secure communication platform
5+
6+
License: GPLv3
7+
URL: https://github.com/irungentoo/toxcore
8+
Source0: https://github.com/irungentoo/toxcore/releases/tox-%{version}.tar.gz
9+
10+
BuildRequires: autoconf automake libtool libvpx-devel opus-devel
11+
BuildRequires: libsodium-devel libconfig-devel
12+
13+
%description
14+
With the rise of governmental monitoring programs, Tox, a FOSS initiative, aims to be an easy to use, all-in-one communication platform that ensures their users full privacy and secure message delivery.
15+
16+
%package devel
17+
Summary: Development files for @PACKAGE_NAME@
18+
Requires: %{name} = %{version}-%{release}
19+
20+
%description devel
21+
Development package for @PACKAGE_NAME@
22+
23+
%prep
24+
%setup -q
25+
26+
27+
%build
28+
%configure \
29+
--enable-shared \
30+
--disable-static \
31+
--enable-av \
32+
--disable-ntox \
33+
--disable-daemon \
34+
--disable-testing
35+
36+
make %{?_smp_mflags}
37+
38+
39+
%install
40+
%make_install
41+
42+
# remove la files
43+
find %{buildroot} -name '*.la' -delete -print
44+
45+
# not handling DHT_bootstrap yet
46+
rm -f %{buildroot}%{_bindir}/DHT_bootstrap
47+
48+
%post
49+
/sbin/ldconfig
50+
51+
%postun
52+
/sbin/ldconfig
53+
54+
%files
55+
%defattr(-,root,root)
56+
%doc COPYING README.md
57+
%{_libdir}/libtox*.so.*
58+
59+
%files devel
60+
%defattr(-, root, root)
61+
%{_includedir}/tox/
62+
%{_libdir}/libtox*.so
63+
%{_libdir}/pkgconfig/libtox*.pc
64+
65+
%changelog
66+
* Tue Mar 3 2015 Sergey 'Jin' Bostandzhyan <[email protected]> - 0.0.0-1
67+
- initial package

0 commit comments

Comments
 (0)