Skip to content

Commit

Permalink
Modified configuration directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrabowski committed Oct 22, 2017
1 parent 3591a23 commit c2d6241
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ install-data-local:
@echo ""
@echo " Installation of the MEDIACTRL Prototype complete"
@echo "------------------------------------------------------"
@echo "(C) Piotr Grabowski, https://github.com/pgrabowski/"
@echo "(C) COMICS Research Group, http://www.comics.unina.it/"
@echo ""
@echo "Type 'make docs' if you want to build the doxygen documentation."
@echo ""
@echo "Don't forget to edit the configuration file before starting:"
@echo " $(sysconfdir)/configuration.xml"
@echo " $(sysconfdir)/mediactr/configuration.xml"
@echo ""
@echo ""
@echo ""
Expand Down
18 changes: 5 additions & 13 deletions mediactrl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Name: mediactrl
Name: mediactrl-prototype
Version: 0.4
Release: 1
Summary: Mediactrl server.
Expand All @@ -9,9 +9,7 @@ Source0: https://github.com/pgrabowski/mediactrl/archive/master.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-c++ libtool make automake c-ares-devel ffmpeg-devel ortp-devel resiprocate-devel expat-devel boost-devel gsm-devel libcurl-devel openssl-devel commoncpp2-devel
BuildArch: x86_64
Requires(post): /sbin/install-info
Requires(postun): /sbin/install-info
Requires: ffmpeg ortp resiprocate expat boost gsm libcurl openssl commoncpp2
Requires: ffmpeg ortp resiprocate-libs expat boost gsm libcurl openssl commoncpp2

%description
Mediactrl server.
Expand All @@ -33,21 +31,15 @@ rm -rf %{buildroot}%{_infodir}/dir
rm -rf %{buildroot}

%post
/sbin/install-info %{_infodir}/autoconf.info %{_infodir}/dir || :

%preun
if [ "$1" = 0 ]; then
/sbin/install-info --del %{_infodir}/autoconf.info %{_infodir}/dir || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%exclude %{_infodir}/standards*
%doc AUTHORS COPYING ChangeLog NEWS README
%config %{_sysconfdir}/mediactrl
%{_bindir}/*
%{_datadir}/autoconf
%{_infodir}/*
%{_mandir}/*/*
%{_datadir}/mediactrl-prototype

%changelog
* Fri Oct 20 2017 Piotr Grabowski <github.com/pgrabowski> 0.4
Expand Down
15 changes: 7 additions & 8 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
dist_sysconf_DATA = stuff/configuration.xml.sample stuff/mycert.pem stuff/mycert.key

AM_CFLAGS = $(RESIP_CFLAGS)
AM_LDFLAGS = $(RESIP_LIBS)

Expand All @@ -15,11 +13,12 @@ endif
SUBDIRS = codecs packages
bin_PROGRAMS = mediactrl
mediactrl_SOURCES = MediaCtrlMemory.h MediaCtrlCodec.h MediaCtrlCodec.cxx RemoteMonitor.cxx RemoteMonitor.h CfwStack.cxx CfwStack.h MediaCtrlClient.cxx MediaCtrlClient.h ControlPackage.cxx ControlPackage.h MediaCtrlEndpoint.cxx MediaCtrlEndpoint.h MediaCtrlSip.cxx MediaCtrlSip.h MediaCtrlRtp.cxx MediaCtrlRtp.h MediaCtrl.cxx MediaCtrl.h prototype.cxx
DEFS += -DDEFAULT_CONF_FILE='"$(sysconfdir)/configuration.xml"'
DEFS += -DDEFAULT_CONF_FILE='"$(sysconfdir)/mediactrl/configuration.xml"'

mediactrlconfdir=$(sysconfdir)/mediactrl
mediactrlconf_DATA = configuration.xml
dist_mediactrlconf_DATA = stuff/configuration.xml.sample stuff/mycert.pem stuff/mycert.key

install-data-local:
test -e "$(sysconfdir)/configuration.xml" || cat stuff/configuration.xml.sample | sed s/\\/usr\\/share/`echo $(datadir) | sed s:\\/:'\\''\\'\\/:g`/g > $(sysconfdir)/configuration.xml
$(INSTALL_DATA) stuff/* $(pkgdatadir)/
configuration.xml:
cat stuff/configuration.xml.sample | sed s/\\/usr\\/share/`echo $(datadir) | sed s:\\/:'\\''\\'\\/:g`/g > configuration.xml

uninstall-local:
$(RM) -rf $(pkgdatadir)

0 comments on commit c2d6241

Please sign in to comment.