Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
bcmatroska2
Commits
52d431c7
Commit
52d431c7
authored
Mar 13, 2018
by
Ronan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(build): supports rpm
parent
85e73f9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
151 additions
and
12 deletions
+151
-12
.gitignore
.gitignore
+1
-1
CMakeLists.txt
CMakeLists.txt
+2
-11
build/CMakeLists.txt
build/CMakeLists.txt
+45
-0
build/rpm/bcmatroska2.spec.cmake
build/rpm/bcmatroska2.spec.cmake
+103
-0
No files found.
.gitignore
View file @
52d431c7
...
...
@@ -3,6 +3,6 @@
*.mak
*.a
GNUmakefile
/build/
/release/
/spectool/spec.xml
bcmatroska2.spec
CMakeLists.txt
View file @
52d431c7
############################################################################
# CMakeLists.txt
# Copyright (C) 2016 Belledonne Communications, Grenoble France
# Copyright (C) 2016
-2018
Belledonne Communications, Grenoble France
#
############################################################################
#
...
...
@@ -103,13 +103,4 @@ install(FILES
DESTINATION
${
CONFIG_PACKAGE_LOCATION
}
)
# CPack settings
set
(
CPACK_SOURCE_GENERATOR
"TGZ"
)
set
(
CPACK_SOURCE_PACKAGE_FILE_NAME
"
${
PROJECT_NAME
}
-
${
PROJECT_VERSION
}
"
)
set
(
CPACK_SOURCE_IGNORE_FILES
"^
${
CMAKE_BINARY_DIR
}
"
"/
\\\\
..+"
)
include
(
CPack
)
add_subdirectory
(
build
)
build/CMakeLists.txt
0 → 100644
View file @
52d431c7
############################################################################
# CMakeLists.txt
# Copyright (C) 2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
if
(
NOT CPACK_PACKAGE_NAME
)
set
(
CPACK_PACKAGE_NAME
"
${
PROJECT_NAME
}
"
)
ENDIF
()
set
(
CPACK_PACKAGE_VERSION_MAJOR
${
PROJECT_VERSION_MAJOR
}
)
set
(
CPACK_PACKAGE_VERSION_MINOR
${
PROJECT_VERSION_MINOR
}
)
set
(
CPACK_PACKAGE_VERSION_PATCH
${
PROJECT_VERSION_PATCH
}
)
set
(
CPACK_PACKAGE_FILE_NAME
${
CPACK_PACKAGE_NAME
}
-
${
PROJECT_VERSION
}
)
set
(
CPACK_SOURCE_GENERATOR
"TGZ"
)
set
(
CPACK_SOURCE_IGNORE_FILES
"
${
CMAKE_BINARY_DIR
}
"
"^
${
PROJECT_SOURCE_DIR
}
/.git*"
)
message
(
"-- Package file name is
${
CPACK_PACKAGE_FILE_NAME
}
"
)
set
(
CPACK_SOURCE_PACKAGE_FILE_NAME
${
CPACK_PACKAGE_FILE_NAME
}
)
configure_file
(
"rpm/bcmatroska2.spec.cmake"
"
${
PROJECT_SOURCE_DIR
}
/bcmatroska2.spec"
@ONLY
)
include
(
CPack
)
build/rpm/bcmatroska2.spec.cmake
0 → 100644
View file @
52d431c7
# -*- rpm-spec -*-
%define _prefix @CMAKE_INSTALL_PREFIX@
%define pkg_prefix @BC_PACKAGE_NAME_PREFIX@
%define _datarootdir %{_prefix}/share
%define _datadir %{_datarootdir}
%define build_number @PROJECT_VERSION@
Name: @CPACK_PACKAGE_NAME@
Version: @PROJECT_VERSION@
Release: %{?dist}
Summary: A libary to parse Matroska
files
(
.mkv and .mka
)
Group: Applications/Multimedia
License: BSD-3
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
A libary to parse Matroska
files
(
.mkv and .mka
)
.
%package devel
Summary: Headers, libraries and docs for the bcmatroska2 library
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
A libary to parse Matroska
files
(
.mkv and .mka
)
.
This package contains header files and development libraries needed to
develop programs using the bcmatroska2 library.
%if 0%{?rhel} && 0%{?rhel} <= 7
%global cmake_name cmake3
%define ctest_name ctest3
%else
%global cmake_name cmake
%define ctest_name ctest
%endif
# This is for debian builds where debug_package has to be manually specified, whereas in centos it does not
%define custom_debug_package %{!?_enable_debug_packages:%debug_package}%{?_enable_debug_package:%{nil}}
%custom_debug_package
%prep
%setup -n %{name}-%{version}
%build
%{expand:%%%cmake_name} . -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} -DCMAKE_PREFIX_PATH:PATH=%{_prefix}
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%check
%{ctest_name} -V %{?_smp_mflags}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%
defattr
(
-,root,root,-
)
%{_libdir}/*.so.*
%files devel
%
defattr
(
-,root,root,-
)
%{_includedir}/corec/*.h
%{_includedir}/corec/array/*.h
%{_includedir}/corec/helpers/charconvert/*.h
%{_includedir}/corec/helpers/date/*.h
%{_includedir}/corec/helpers/file/*.h
%{_includedir}/corec/helpers/md5/*.h
%{_includedir}/corec/helpers/parser/*.h
%{_includedir}/corec/helpers/system/*.h
%{_includedir}/corec/multithread/*.h
%{_includedir}/corec/node/*.h
%{_includedir}/corec/str/*.h
%{_includedir}/ebml/*.h
%{_includedir}/matroska/*.h
%{_datadir}/bcmatroska2/cmake/*.cmake
%if @ENABLE_STATIC@
%{_libdir}/*.a
%endif
%if @ENABLE_SHARED@
%{_libdir}/*.so
%endif
%changelog
* Tue Mar 13 2018 ronan.abhamon <ronan.abhamon@belledonne-communications.com>
- Initial RPM release.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment