Summary: osgi-runner - The OSGi service packaging of clazzes.org Name: osgi-runner-pkg Packager: Wolfgang Glas BuildRequires: tar wget BuildArch: noarch Version: 1.2.0 Release: 1 License: APL2/clazzes.org Group: Applications/Internet Source: osgi-runner-pkg-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-buildroot ###XBCS-PBA-Category: osgi-runner ###XBCS-PBA-Generation: 1 ###XBCS-PBA-Distributions: centos6 centos7 ###XBCS-PBA-Repository: rpm.clazzes.org %define __jar_repack 0 %description osgi-runner meta-package depending on server and client packages. %package -n osgi-runner-server Summary: The server part of osgi-runner Requires: jsvc slf4j java %description -n osgi-runner-server osgi-runner is a server, which runs the apache felix OSGi container %package -n osgi-runner-client Summary: ssh wrapper scripts for accessing an osgi-runner server Requires: openssh-clients %description -n osgi-runner-client Client tools to conenct to osgi-runner via ssh. %package -n osgi-runner Summary: osgi-runner meta package depending on client and server. Requires: osgi-runner-server osgi-runner-client %description -n osgi-runner osgi-runner is a metapackage, which runs the apache felix OSGi container %prep %setup -q ./fetch_bundles.sh %install OSGI_HOME=/usr/share/osgi-runner OSGI_ETC=/etc/osgi-runner rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT$OSGI_HOME/sh mkdir -p $RPM_BUILD_ROOT/etc/init.d # collect srv (cd etc; tar --exclude=.svn --exclude='*~' -c -f - default osgi-runner) | (cd $RPM_BUILD_ROOT/etc; tar xf -) (cd $RPM_BUILD_ROOT$OSGI_ETC/karaf.d; ln -s ../adm.d/org.apache.karaf.shell.cfg .) chmod 750 $RPM_BUILD_ROOT$OSGI_ETC/karaf.d chmod 640 $RPM_BUILD_ROOT$OSGI_ETC/karaf.d/* cp unix/unix.properties $RPM_BUILD_ROOT$OSGI_ETC/conf.d mkdir $RPM_BUILD_ROOT$OSGI_HOME/drivers install -m 755 init.d/osgi-runner-redhat $RPM_BUILD_ROOT/etc/init.d/osgi-runner install -m 755 unix/create-osgi-user.sh $RPM_BUILD_ROOT$OSGI_HOME/sh cp -pr downloads/lib $RPM_BUILD_ROOT$OSGI_HOME cp -pr downloads/bundle1 $RPM_BUILD_ROOT$OSGI_HOME cp -pr downloads/bundle2 $RPM_BUILD_ROOT$OSGI_HOME cp -pr downloads/bundle3 $RPM_BUILD_ROOT$OSGI_HOME cp -pr downloads/bundle4 $RPM_BUILD_ROOT$OSGI_HOME cp -pr downloads/bundle5 $RPM_BUILD_ROOT$OSGI_HOME # collect client mkdir -p $RPM_BUILD_ROOT/usr/bin install -m 755 unix/karaf-cmd.sh $RPM_BUILD_ROOT/usr/bin/karaf-cmd install -m 755 unix/karaf-install.sh $RPM_BUILD_ROOT/usr/bin/karaf-install install -m 755 unix/karaf-shell.sh $RPM_BUILD_ROOT/usr/bin/karaf-shell %clean rm -rf $RPM_BUILD_ROOT rm -rf downloads %pretrans -n osgi-runner-server test -x /etc/init.d/osgi-runner && (/etc/init.d/osgi-runner status > /dev/null && /etc/init.d/osgi-runner stop) || /bin/true %preun -n osgi-runner-server test -x /etc/init.d/osgi-runner && (/etc/init.d/osgi-runner status > /dev/null && /etc/init.d/osgi-runner stop) || /bin/true if test -d /var/cache/osgi-runner/felix-cache then echo "Cleaning /var/cache/osgi-runner/felix-cache upon removal of osgi-runner." /bin/rm -rf /var/cache/osgi-runner/felix-cache fi %pre -n osgi-runner-server test -x /etc/init.d/osgi-runner && (/etc/init.d/osgi-runner status > /dev/null && /etc/init.d/osgi-runner stop) || /bin/true if test -d /var/cache/osgi-runner/felix-cache then echo "Cleaning /var/cache/osgi-runner/felix-cache upon removal of osgi-runner." /bin/rm -rf /var/cache/osgi-runner/felix-cache fi %post -n osgi-runner-server /usr/share/osgi-runner/sh/create-osgi-user.sh %posttrans -n osgi-runner-server test -x /etc/init.d/osgi-runner && (/etc/init.d/osgi-runner status > /dev/null || /etc/init.d/osgi-runner start) || /bin/true %files -n osgi-runner-server %defattr(-,root,root) /usr/share/osgi-runner %config /etc/init.d/osgi-runner %config(noreplace) /etc/default/osgi-runner %config(noreplace) /etc/osgi-runner %files -n osgi-runner-client %defattr(-,root,root) /usr/bin %files -n osgi-runner %defattr(-,root,root) %changelog