Compare commits

...
Sign in to create a new pull request.

5 commits
master ... rpm

5 changed files with 103 additions and 12 deletions

1
.gitignore vendored
View file

@ -38,7 +38,6 @@ Release
*.patch
*~
*.bz2
libuldaq.pc.in
.dirstamp
src/*.sh
examples/*

View file

@ -69,17 +69,30 @@ AM_CONDITIONAL(OS_LINUX, test "x$os" = xlinux)
AM_CONDITIONAL(OS_DARWIN, test "x$os" = xdarwin)
# Examples build
AC_ARG_ENABLE([disable-examples-build], [AS_HELP_STRING([--disable-examples-build],
[disable building example applications [default=no]])],
[disable_build_examples=$enableval],
[disable_build_examples=no])
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$disable_build_examples" != xyes)
AC_ARG_ENABLE([examples],
AS_HELP_STRING([--enable-examples],
[enable building example applications, default: yes]),
[case "${enableval}" in
yes) build_examples=true ;;
no) build_examples=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-examples]) ;;
esac],
[build_examples=true]
)
AM_CONDITIONAL(BUILD_EXAMPLES, test x"$build_examples" == x"true")
# Debug enable
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--debug],
[turn on debugging [default=no]])],
[debug=$enableval],
[debug=no])
AM_CONDITIONAL(DEBUG, test "x$debug" != xno)
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false]
)
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AC_SUBST(LTLDFLAGS)

10
libuldaq.pc.in Normal file
View file

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@bindir@
includedir=@includedir@
libdir=@libdir@
Name: uldaq
Description: MCC Universal Library for Linux
Version: 1.1.0
Cflags: -I${includedir}
Libs: -L${libdir} -luldaq

65
packaging/uldaq.spec Normal file
View file

@ -0,0 +1,65 @@
Name: uldaq
Version: 1.1.0
Release: 1%{?dist}
Summary: MCC Universal Library for Linux
URL: http://www.mccdaq.com
License: MIT
Source0: https://github.com/mccdaq/uldaq/archive/v1.1.0.tar.gz
BuildRequires: libusb-devel m4 autoconf automake libtool
Requires: libusb
%description
The uldaq package contains programming libraries and components for developing applications using C/C++ on Linux and macOS Operating Systems.
An API (Application Programming Interface) for interacting with the library in Python is available as an additional installation.
This package was created and is supported by MCC.
%package devel
Summary: Headers and libraries for building apps that use uldaq
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains headers and libraries required to build applications that
use the uldaq acquisition devices.
%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1
autoreconf -i
%build
CFLAGS="-fPIC"; export CFLAGS
LDFLAGS="-fPIC"; export LDFLAGS
%configure --prefix=/usr --enable-shared --enable-debug
make %{_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root,-)
%doc README.md
%{_defaultdocdir}/libuldaq/README.md
%{_libdir}/libuldaq.so.1.1.0
%{_libdir}/libuldaq.so.1
%{_libdir}/libuldaq.so
/etc/uldaq/fpga/*
/lib/udev/rules.d/50-uldaq.rules
%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libuldaq.pc
%{_includedir}/uldaq.h
%{_libdir}/libuldaq.a
%{_libdir}/libuldaq.la
%changelog
* Thu Jan 10 2019 Steffen Vogel <post@steffenvogel.de> 1.1.0-1
- Created Initial Spec File.

View file

@ -1,7 +1,11 @@
AUTOMAKE_OPTIONS = subdir-objects
if DEBUG
AM_CPPFLAGS = -DDEBUG
AM_CFLAGS = -g3 -O0 -DDEBUG
AM_CXXFLAGS = -g3 -O0 -DDEBUG
else
AM_CFLAGS = -O2
AM_CXXFLAGS = -O2
endif
lib_LTLIBRARIES = libuldaq.la