diff --git a/actors/.gitignore b/actors/.gitignore index 675118bb7..4d038f605 100644 --- a/actors/.gitignore +++ b/actors/.gitignore @@ -5,4 +5,4 @@ udsactor*.build udsactor*.changes /udsactor_1.7.0.dsc /udsactor_1.7.0.tar.xz -/udsactor-1.7.0-1.noarch.rpm +/udsactor*.rpm diff --git a/actors/linux/buildrpm.sh b/actors/linux/buildrpm.sh index f47385cf1..ce568163d 100755 --- a/actors/linux/buildrpm.sh +++ b/actors/linux/buildrpm.sh @@ -2,8 +2,12 @@ top=`pwd` -#rm -rf rpm +rm -rf rpm for folder in SOURCES BUILD RPMS SPECS SRPMS; do mkdir -p rpm/$folder done -rpmbuild -v -bb --clean --target noarch 'udsactor-1.7.0.spec' 2>&1 + +for pkg in udsactor-1.7.0.spec udsactor-xrdp-1.7.0.spec; do + rpmbuild -v -bb --clean --target noarch $pkg 2>&1 +done + diff --git a/actors/linux/udsactor-1.7.0.spec b/actors/linux/udsactor-1.7.0.spec index c6bf84241..a10966a72 100644 --- a/actors/linux/udsactor-1.7.0.spec +++ b/actors/linux/udsactor-1.7.0.spec @@ -23,7 +23,7 @@ Provides: udsactor %install curdir=`pwd` cd ../.. -make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor cd $curdir %clean diff --git a/actors/linux/udsactor-xrdp-1.7.0.spec b/actors/linux/udsactor-xrdp-1.7.0.spec new file mode 100644 index 000000000..b07abb5f0 --- /dev/null +++ b/actors/linux/udsactor-xrdp-1.7.0.spec @@ -0,0 +1,61 @@ +%define _topdir %(echo $PWD)/rpm +%define name udsactor-xrdp +%define version 1.7.0 +%define release 1 +%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root + +BuildRoot: %{buildroot} +Name: %{name} +Version: %{version} +Release: %{release} +Summary: Glue between UDS Actor and XRDP +License: BSD3 +Group: Admin +Requires: xrdp udsactor pam +Vendor: Virtual Cable S.L.U. +URL: http://www.udsenterprise.com +Provides: udsactor-xrdp + +%define _rpmdir ../ +%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm + + +%install +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor-xrdp +cd $curdir + +%clean +rm -rf $RPM_BUILD_ROOT +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean +cd $curdir + + +%post +SESMANFILE=/etc/pam.d/xrdp-sesman +TMPFILE=$(mktemp /tmp/sesman.XXXXX) +grep -v uds $SESMANFILE > $TMPFILE +echo >> $TMPFILE +echo "# Added by udsactor-xrdp" >> $TMPFILE +echo "session optional pam_exec.so /usr/bin/uds-sesman" >> $TMPFILE +cp $TMPFILE $SESMANFILE +rm $TMPFILE > /dev/null 2>&1 + +%preun + +%postun +SESMANFILE=/etc/pam.d/xrdp-sesman +TMPFILE=$(mktemp /tmp/sesman.XXXXX) +grep -v uds $SESMANFILE > $TMPFILE +cp $TMPFILE $SESMANFILE +rm $TMPFILE > /dev/null 2>&1 + +%description +This package provides the required components to allow this machine to work on an environment managed by UDS Broker. + +%files +%defattr(-,root,root) +/usr/bin/* \ No newline at end of file