#ExclusiveArch: i386 x86 x86_64 ExclusiveOS: linux %define slide_min_ver 1.3.14 BuildRequires: eclipse-pde >= 3.4 BuildRequires: eclipse-gef >= 3.4 BuildRequires: javacc BuildRequires: ant >= 1.6 BuildRequires: libselinux >= 1.30 BuildRequires: libsepol-devel BuildRequires: libsepol-static BuildRequires: eclipse-slide >= %{slide_min_ver} BuildRequires: swig BuildRequires: libselinux-devel BuildRequires: perl(XML::XPath) BuildRequires: rpm-build ## The source for this packaged was pulled from upstreams' svn repo. ## Use the following commands to generate the tarball # mkdir eclipse-cdsframework # cd eclipse-cdsframework # svn export http://oss.tresys.com/repos/cdsframework/tags/%{version}/framework-plugin framework-plugin # svn export http://oss.tresys.com/repos/cdsframework/tags/%{version}/oss-feature eclipse-feature # svn export http://oss.tresys.com/repos/cdsframework/tags/%{version}/helpfiles cdsframework-help #Source0: %{name}.tar.gz #Release: 0.1.svnxxxx%{?dist} Source0: http://oss.tresys.com/projects/cdsframework/chrom/site/src/%{name}-%{version}.tar.gz Release: 1%{?dist} %define eclipse_name eclipse %define eclipse_base %{_datadir}/%{eclipse_name}/dropins/cdsframework %define eclipse_lib_base %{_libdir}/%{eclipse_name}/dropins/libselinux %define svnbase http://oss.tresys.com/repos/cdsframework/trunk/ %ifarch i386 %define arch x86 %else %define arch %{_arch} %endif Summary: Cross Domain Solution SELinux policy editor plugin for Eclipse Name: eclipse-cdsframework Version: 4.0.0 License: GPL2 #BuildArch: noarch Group: Text Editors/Integrated Development Environments (IDE) URL: http://oss.tresys.com/projects/cdsframework Requires: eclipse-platform >= 3.4 Requires: eclipse-gef >= 3.4 Requires: libselinux >= 1.30 Requires: eclipse-slide >= %{slide_min_ver} Requires: libsepol Requires: libsepol-static BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description The Cross Domain Solution Framework toolkit (CDS Framework) make the power of Security Enhanced Linux (SELinux) available to system designers without in-depth knowledge of SELinux type enforcement language. This extensible toolkit encourages security enginering by putting the focus on information flow from the beginning of design. %prep %setup -q -c -n eclipse-cdsframework %build #libselinux fragment cd libselinux.%{_os}.%{arch} ant -f ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinuxjava-plugin/swig/antbuild.xml -Dtarget_arch=%{arch} -Dtarget_dir=${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux.%{_os}.%{arch}/libselinuxjava -Djava_target_dir=${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/src/com/tresys/framework/compiler/linkage/libselinuxjava/ #jar -cf libselinuxjava.jar META-INF/ ant -f rpmbuild.xml buildjar #libselinux plugin cd ../libselinuxjava-plugin ant -f rpmbuild.xml buildlibjar #cdsframework help cd ../framework-help ant -f rpmbuild.xml #cdsframework plugin cd ../framework-plugin ant -f rpmbuild.xml -Dlibselinux_fragment_jar=${RPM_BUILD_DIR}/eclipse-cdsframework/libselinuxjava-plugin/libselinux.jar -Dlibselinux_plugin_jar=${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux.%{_os}.%{arch}/libselinuxjava.jar buildjar %install CDS_PLUGIN_VER=`grep Bundle-Version framework-plugin/META-INF/MANIFEST.MF | cut -d : -f 2 | tr -d " "` HELP_VER=`grep Bundle-Version framework-help/META-INF/MANIFEST.MF | cut -d : -f 2 | tr -d " "` CDS_FEATURE_VER=%{version} CDS_PLUGIN_DIR=%{eclipse_base}/plugins/com.tresys.cdsframework_${CDS_PLUGIN_VER} CDS_HELP_JAR=%{eclipse_base}/plugins/com.tresys.cdsframework.doc.user_${HELP_VER}.jar CDS_FEATURE_DIR=%{eclipse_base}/features/com.tresys.cdsframework_${CDS_FEATURE_VER} LSEL_PLUGIN_VER=`grep Bundle-Version libselinuxjava-plugin/META-INF/MANIFEST.MF | cut -d : -f 2 | tr -d " "` LSEL_FRAGMENT_VER=`grep Bundle-Version libselinux.linux.%{arch}/META-INF/MANIFEST.MF | cut -d : -f 2 | tr -d " "` LSEL_FEATURE_VER=`xpath libselinux-feature/feature.xml /feature/@version 2> /dev/null | cut -d '"' -f 2` LSEL_PLUGIN_DIR=%{eclipse_lib_base}/plugins/com.tresys.libselinuxjava_${LSEL_PLUGIN_VER} LSEL_FRAGMENT_DIR=%{eclipse_lib_base}/plugins/com.tresys.libselinux.%{_os}.%{arch}_${LSEL_FRAGMENT_VER} LSEL_FEATURE_DIR=%{eclipse_lib_base}/features/com.tresys.libselinuxjava_${LSEL_FEATURE_VER} LSEL_FRAGMENT_SRC=libselinux.%{_os}.%{arch} #rm -rf ${RPM_BUILD_ROOT} install -pd -m755 ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} install -pd -m755 ${RPM_BUILD_ROOT}${LSEL_PLUGIN_DIR} install -pd -m755 ${RPM_BUILD_ROOT}${LSEL_FRAGMENT_DIR} install -pd -m755 ${RPM_BUILD_ROOT}${CDS_FEATURE_DIR} install -pd -m755 ${RPM_BUILD_ROOT}${LSEL_FEATURE_DIR} #features install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-feature/feature.xml ${RPM_BUILD_ROOT}${CDS_FEATURE_DIR} install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux-feature/feature.xml ${RPM_BUILD_ROOT}${LSEL_FEATURE_DIR} # cds framework plugin install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/CDSFramework.jar ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/COPYING ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/plugin.xml ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/plugin.properties ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/about.html ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR} cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/icons ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR}/icons cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/resources ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR}/resources cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-plugin/META-INF ${RPM_BUILD_ROOT}${CDS_PLUGIN_DIR}/META-INF # cds framework help install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/framework-help/help.jar ${RPM_BUILD_ROOT}${CDS_HELP_JAR} #libselinuxjava fragment install -pd -m755 ${RPM_BUILD_ROOT}${LSEL_FRAGMENT_DIR}/libselinuxjava cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux.%{_os}.%{arch}/libselinuxjava/libselinuxjava.so ${RPM_BUILD_ROOT}${LSEL_FRAGMENT_DIR}/libselinuxjava/ cp -p ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux.%{_os}.%{arch}/libselinuxjava.jar ${RPM_BUILD_ROOT}${LSEL_FRAGMENT_DIR}/ cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinux.%{_os}.%{arch}/META-INF ${RPM_BUILD_ROOT}${LSEL_FRAGMENT_DIR} #libselinuxjava plugin install -p -m644 ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinuxjava-plugin/libselinux.jar ${RPM_BUILD_ROOT}${LSEL_PLUGIN_DIR} cp -pR ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinuxjava-plugin/META-INF ${RPM_BUILD_ROOT}${LSEL_PLUGIN_DIR} cp -p ${RPM_BUILD_DIR}/eclipse-cdsframework/libselinuxjava-plugin/plugin.properties ${RPM_BUILD_ROOT}${LSEL_PLUGIN_DIR} %clean rm -rf ${RPM_BUILD_ROOT} %post if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %postun rm -rf ${plugin_dir} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %files %defattr(-,root,root,-) %{eclipse_base} %{eclipse_lib_base} %changelog * Thu Nov 19 2009 Dave Sugar - 4.0.0 - highlight information flow * Wed Jun 10 2009 Dave Sugar - 3.6.0 - quick fix for audit denials (debugging) - support for multiple secondary layers (show primary information flow) * Tue Mar 10 2009 Dave Sugar - 3.3.0 - ability to print (with eclipse 3.4) - bug fixes with line routing * Fri Dec 12 2008 Dave Sugar - 3.0.7 - added a bunch of abilities - some updates for newer SLIDE * Fri Jun 27 2008 Dave Sugar - 3.0.1 - fix problems with access checking - fix problem with generation of MLS sensitivities - allow partial editing of customized objects * Wed Jun 11 2008 Dave Sugar - 3.0.0 - Final public release for 2008 work - New features including: - Customizing generated policy - MLS Features - Networking features * Thu Feb 14 2008 Dave Sugar - 2.2.0 - Quartly public release for 2008 work - Mostly bug fixes from 2.0.0 - minor new features - hiding entry points form editors for linkage files, * Mon Dec 31 2007 Dave Sugar - 2.0.1 - update SPEC file to Fedora standards