Added dist files.

master
Hannes Matuschek 12 years ago
parent a9174d2daf
commit d4aa3d1694

@ -4,6 +4,13 @@ project(libsdr)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
include(InstallHeadersWithDirectory)
OPTION(BUILD_EXAMPLES "Build examples" OFF)
OPTION(BUILD_UNIT_TESTS "Build unit tests" OFF)
SET(libsdr_VERSION_MAJOR "0")
SET(libsdr_VERSION_MINOR "1")
SET(libsdr_VERSION_PATCH "0")
find_package(Qt5Core)
find_package(Qt5Widgets)
@ -64,15 +71,38 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/config.hh.in
${CMAKE_CURRENT_BINARY_DIR}/src/config.hh)
#
# Get default install directories under Linux
#
IF(UNIX AND NOT APPLE)
INCLUDE(GNUInstallDirs)
ELSE(UNIX AND NOT APPLE)
SET(CMAKE_INSTALL_LIBDIR "lib")
SET(CMAKE_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
SET(CMAKE_INSTALL_INCLUDEDIR "include")
SET(CMAKE_INSTALL_FULL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
# Set RPATH under MacOS
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
#SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--std=c++98 --stdlib=libc++")
#SET(LIBS ${LIBS} "c++")
ENDIF(UNIX AND NOT APPLE)
# Add core library, and unit tests
add_subdirectory(src)
IF(BUILD_UNIT_TESTS)
add_subdirectory(test)
add_subdirectory(examples)
ENDIF(BUILD_UNIT_TESTS)
IF(BUILD_EXAMPLES)
add_subdirectory(examples)
ENDIF(BUILD_EXAMPLES)
# Source distribution packages:
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_VERSION_MAJOR ${libsdr_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${libsdr_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${libsdr_VERSION_PATCH})
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

@ -0,0 +1,5 @@
libsdr (0.1.0-1) unstable; urgency=low
* Initial official release.
-- Hannes Matuschek <hmatuschek@gmail.com> Sun, 07 December 2014 00:00:00 +0000

@ -0,0 +1,14 @@
Source: libsdr
Priority: extra
Maintainer: Hannes Matuschek <hmatuschek@gmail.com>
Build-Depends: cdbs (>= 0.4.51), dh-exec, debhelper (>= 8.0.0), cmake, qtbase5-dev (>= 5.0), portaudio19-dev, librtlsdr-dev, fftw3-dev
Standards-Version: 3.9.2
Section: hamradio
Homepage: http://github.com/hmatuschek/libsdr
Package: libsdr
Section: hamradio
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: libsdr
A C++ library for software defined radio.

@ -0,0 +1,4 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk

@ -0,0 +1,10 @@
Format: 1.0
Source: libsdr
Binary: libsdr
Version: 3.1.0
Maintainer: Hannes Matuschek <hmatuschek@gmail.com>
Architecture: any
Build-Depends: cdbs (>= 0.4.51), dh-exec, debhelper (>= 8.0.0), cmake, qtbase5-dev (>= 5.0), portaudio19-dev, librtlsdr-dev, fftw3-dev
Files:
d57283ebb8157ae919762c58419353c8 133282 libsdr-0.1.0.tar.gz
d57283ebb8157ae919762c58419353c8 133282 libsdr-0.1.0.diff.tar.gz

@ -0,0 +1,77 @@
Summary: A C++ library for software defined radios
%define version 0.1.0
License: GPL-2.0+
Name: libsdr
Group: Development/Libraries/C and C++
Prefix: /usr
Release: 1
Source: libsdr-%{version}.tar.gz
URL: https://github.com/hmatuschek/libsdr
Version: %{version}
Buildroot: /tmp/libsdrrpm
BuildRequires: gcc-c++, cmake, portaudio-devel, fftw3-devel, librtlsdr-devel
Requires: portaudio, fftw3, librtlsdr-devel
%if 0%{?suse_version}
BuildRequires: libqt5-qtbase-devel
Requires: libqt5-qtbase
%endif
%if 0%{?fedora}
BuildRequires: qt5-qtbase-devel
Requires: qt5-qtbase
%endif
%description
A simple C++ library for software defined radios.
%package -n libsdr-devel
Summary: A C++ library for software defined radios
Group: Development/Libraries/C and C++
BuildRequires: gcc-c++, cmake, portaudio-devel, fftw3-devel, librtlsdr-devel
Requires: portaudio, fftw3, librtlsdr
%if 0%{?suse_version}
BuildRequires: libqt5-qtbase-devel
Requires: libqt5-qtbase
%endif
%if 0%{?fedora}
BuildRequires: qt5-qtbase-devel
Requires: qt5-qtbase
%endif
%description -n libsdr-devel
Provides the runtime library header files for libsdr.
%prep
%setup -q
%build
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT/usr
make
%install
make install
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%{_libdir}/libsdr.so.*
%{_libdir}/libsdr-gui.so.*
%files -n libsdr-devel
%defattr(-, root, root, -)
%{_libdir}/libsdr.so
%{_libdir}/libsdr-gui.so
%{_includedir}/libsdr/

@ -13,10 +13,12 @@ if(SDR_WITH_PORTAUDIO)
set(LIBSDR_SOURCES ${LIBSDR_SOURCES} portaudio.cc)
set(LIBSDR_HEADERS ${LIBSDR_HEADERS} portaudio.hh)
endif(SDR_WITH_PORTAUDIO)
if(SDR_WITH_FFTW)
set(LIBSDR_SOURCES ${LIBSDR_SOURCES})
set(LIBSDR_HEADERS ${LIBSDR_HEADERS} fftplan_fftw3.hh)
endif(SDR_WITH_FFTW)
if(SDR_WITH_RTLSDR)
set(LIBSDR_SOURCES ${LIBSDR_SOURCES} rtlsource.cc)
set(LIBSDR_HEADERS ${LIBSDR_HEADERS} rtlsource.hh)
@ -27,8 +29,16 @@ add_custom_target(libsdr_hdrs SOURCES ${LIBSDR_HEADERS})
add_library(libsdr SHARED ${LIBSDR_SOURCES})
set_target_properties(libsdr PROPERTIES OUTPUT_NAME sdr)
set_target_properties(libsdr PROPERTIES DEPENDS libsdr_hdrs)
set_target_properties(libsdr PROPERTIES VERSION
"${libsdr_VERSION_MAJOR}.${libsdr_VERSION_MINOR}.${libsdr_VERSION_PATCH}")
set_target_properties(libsdr PROPERTIES SOVERION "${libsdr_VERSION_MAJOR}")
target_link_libraries(libsdr ${LIBS})
install(TARGETS libsdr DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL_HEADERS_WITH_DIRECTORY("${LIBSDR_HEADERS}" "${CMAKE_INSTALL_INCLUDEDIR}/libsdr")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config.hh"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/libsdr")
if(SDR_WITH_FFTW AND SDR_WITH_QT5)
set(libsdr_gui_SOURCES gui/spectrum.cc gui/spectrumview.cc gui/waterfallview.cc)
set(libsdr_gui_MOC_HEADERS gui/spectrum.hh gui/spectrumview.hh gui/waterfallview.hh)
@ -37,6 +47,12 @@ if(SDR_WITH_FFTW AND SDR_WITH_QT5)
add_library(libsdr-gui SHARED ${libsdr_gui_SOURCES} ${libsdr_gui_MOC_SOURCES})
set_target_properties(libsdr-gui PROPERTIES OUTPUT_NAME sdr-gui)
set_target_properties(libsdr-gui PROPERTIES VERSION
"${libsdr_VERSION_MAJOR}.${libsdr_VERSION_MINOR}.${libsdr_VERSION_PATCH}")
set_target_properties(libsdr-gui PROPERTIES SOVERION "${libsdr_VERSION_MAJOR}")
target_link_libraries(libsdr-gui libsdr ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES})
install(TARGETS libsdr-gui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL_HEADERS_WITH_DIRECTORY("${libsdr_gui_HEADERS}" "${CMAKE_INSTALL_INCLUDEDIR}/libsdr")
endif(SDR_WITH_FFTW AND SDR_WITH_QT5)

Loading…
Cancel
Save