Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing old RPM build targets and spec file. NAnt RPMs are being bui…

…lt at build.opensuse.org under Mono:NAnt project. Added new spec file (etc/obs.spec) that is being used at build.opensuse.org
  • Loading branch information...
commit 46b1f55cdfa2fa6d3b23e608e4a16941fe82023f 1 parent 710aebd
@rmboggs rmboggs authored
Showing with 118 additions and 131 deletions.
  1. +0 −11 NAnt.build
  2. +0 −66 NAnt.spec
  3. +118 −0 etc/obs.spec
  4. +0 −54 release.xml
View
11 NAnt.build
@@ -877,15 +877,4 @@
<echo file="${wrapper}" append="true">exec ${path::combine(install.prefix, 'bin')}/mono ${path::combine(install.nant, 'bin')}/NAnt.exe "$@"</echo>
<exec program="chmod" commandline="a+x ${path::combine(install.bindir, 'nant')}" />
</target>
- <target name="rpm" depends="init, build">
- <echo message="Build dir: ${build.dir}" />
- <copy todir="${build.dir}">
- <fileset>
- <include name="NAnt.spec" />
- </fileset>
- </copy>
-
- <nant buildfile="release.xml" target="prepare-rpm" />
- <nant buildfile="release.xml" target="binary-rpm" />
- </target>
</project>
View
66 NAnt.spec
@@ -1,66 +0,0 @@
-Summary: NAnt - A cross platform build tool for the .Net platform.
-Name: NAnt
-Version: 0.85
-Release: 1
-Copyright: GPL
-Group: Development/Tools
-Source: NAnt.tar.gz
-Distribution: Fedora Core
-Vendor: http://nant.sourceforge.net
-Packager: http://nant.sourceforge.net
-Prefix: /usr
-BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-Requires: mono
-
-%description
-NAnt is a .NET based build tool. In theory it is kind of like make without
-make's wrinkles. In practice it's a lot like Ant.
-
-If you are not familiar with Jakarta Ant you can get more information at the
-Ant project web site (http://ant.apache.org/).
-
-If you are not familiar with NAnt you can get more information at the NAnt
-project web site (http://NAnt.sourceforge.net).
-
-%pre
-echo "Installing NAnt ..."
-
-%post
-echo "NAnt has been installed; For usage type NAnt.exe -help."
-
-%prep
-%setup -n %{name}-%{version}-%{release} -c
-
-%build
-if [ -d $RPM_BUILD_ROOT ] && [ -d $RPM_BUILD_ROOT%{_libdir} ] && [ -d $RPM_BUILD_ROOT%{_bindir} ]
-then
- echo BuildRoot is created.
-else
- mkdir -p $RPM_BUILD_ROOT%{_libdir}
- mkdir -p $RPM_BUILD_ROOT%{_bindir}
-fi
-
-%install
-rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}-%{release}
-mkdir $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}-%{release}
-echo 'mono '$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}-%{release}'/NAnt.exe' > $RPM_BUILD_ROOT%{_bindir}/%{name}
-chmod a+rwx $RPM_BUILD_ROOT%{_bindir}/%{name}
-cp -R bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}-%{release}
-
-%preun
-echo "Uninstalling NAnt ..."
-%postun
-rm -rf $RPM_BUILD_ROOT%{_bindir}/%{name}-%{version}-%{release}
-rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}
-echo "NAnt has been removed from your system."
-
-%files
-/usr/lib/%{name}-%{version}-%{release}/*
-
-%clean
-[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"/*
-
-%changelog
-* Sat Aug 21 2004 Clayton Harbour <claytonharbour@sporadicism.com>
-- Initial RPM.
View
118 etc/obs.spec
@@ -0,0 +1,118 @@
+# spec file for package nant
+#
+# NAnt - A .NET build tool
+# Copyright (C) 2001-2003 Gerry Shaw
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Please submit bugfixes or comments via http://nant.sourceforge.net/
+
+# NAnt Version vars
+%define nant_version_num 0.91
+%define nant_version_type final
+
+# NAnt Makefile arguments
+%define nant_make_args TARGET=mono-2.0 MCS=gmcs
+
+# Create nant_version to use for filename purposes
+%if 0%(test "%nant_version_type" = "final" && echo 1 || echo 0)
+%define nant_version %{nant_version_num}
+%else
+%define nant_version %{nant_version_num}-%{nant_version_type}
+%endif
+
+Name: nant
+# We have to append a .0 to make sure the rpm upgrade versioning works.
+# nant's progression: 0.85-rc4, 0.85
+# working rpm upgrade path requires: 0.85-rc4, 0.85.0
+Version: %{nant_version_num}
+Release: 0
+License: GPL-2.0+
+Url: http://nant.sourceforge.net
+Vendor: http://nant.sourceforge.net
+Source0: %{name}-%{nant_version}-src.tar.gz
+Summary: NAnt - A cross platform build tool for the .Net platform
+Group: Development/Tools/Building
+BuildRoot: %{_tmppath}/%{name}-%{nant_version}-build
+#BuildArch: noarch
+
+# Only needed when building from prefer rpms (normally mono-devel depends on glib2-devel)
+BuildRequires: glib2-devel
+BuildRequires: mono-data mono-devel pkgconfig
+
+#### suse ####
+%if 0%{?suse_version}
+%define old_suse_buildrequires mono-winforms mono-web
+%if %sles_version == 9
+BuildRequires: %{old_suse_buildrequires}
+%define env_options export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnome/%_lib/pkgconfig
+%endif
+%endif
+# Fedora options (Bug in fedora images where 'abuild' user is the same id as 'nobody')
+%if 0%{?fedora_version} || 0%{?rhel_version}
+%define env_options export MONO_SHARED_DIR=/tmp
+%endif
+
+%description
+NAnt is a .NET based build tool. In theory it is kind of like make without
+make's wrinkles. In practice it's a lot like Ant.
+
+If you are not familiar with Jakarta Ant you can get more information at the
+Ant project web site (http://ant.apache.org/).
+
+If you are not familiar with NAnt you can get more information at the NAnt
+project web site (http://NAnt.sourceforge.net).
+
+Authors:
+--------
+ Gerry Shaw
+
+%files
+%defattr(-, root, root)
+%{_bindir}/nant
+%{_datadir}/NAnt
+%{_prefix}/lib/pkgconfig/nant.pc
+%doc %{_prefix}/share/doc/NAnt
+
+%post
+echo "NAnt has been installed; For usage type NAnt.exe -help."
+
+%prep
+%setup -q -n %{name}-%{nant_version}
+
+%build
+%{?env_options}
+make %{nant_make_args}
+
+%install
+%{?env_options}
+make install %{nant_make_args} DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix}
+
+%preun
+echo "NAnt has been uninstalled"
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+%if 0%{?fedora_version} || 0%{?rhel_version}
+# Allows overrides of __find_provides in fedora distros... (already set to zero on newer suse distros)
+%define _use_internal_dependency_generator 0
+%endif
+# ignore some bundled dlls
+%define __find_provides env sh -c 'filelist=($(grep -v log4net.dll | grep -v scvs.exe | grep -v nunit | grep -v NDoc | grep -v neutral)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; } | sort | uniq'
+%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires && printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; } | sort | uniq'
+
+%changelog
+* Sat Mar 24 2012 Ryan Boggs <rmboggs@gmail.com>
+- Revamped RPM spec file for build.opensuse.org (Project: Mono:NAnt)
View
54 release.xml
@@ -170,58 +170,4 @@
<arg value="find ${sf.net.web.path} -maxdepth 1 -type f -exec chgrp nant {} \;" />
</exec>
</target>
-
- <!-- Temporary directories for building the rpm...there might be a better way to do this. -->
- <property name="rpm.base" value="c:/temp/NAnt/rpm"/>
- <property name="rpm.working" value="c:/temp/NAnt/working"/>
- <property name="cygwin.rpm.base" value="/cygdrive/c/temp/NAnt/rpm"/>
- <property name="cygwin.rpm.working" value="/cygdrive/c/temp/NAnt/working"/>
-
- <target name="setup-rpm" description="Sets up the environment for building rpms.">
- <mkdir dir="${rpm.base}"/>
- <mkdir dir="${rpm.base}/BUILD"/>
- <mkdir dir="${rpm.base}/RPMS"/>
- <mkdir dir="${rpm.base}/i386"/>
- <mkdir dir="${rpm.base}/i686"/>
- <mkdir dir="${rpm.base}/noarch"/>
- <mkdir dir="${rpm.base}/SOURCES"/>
- <mkdir dir="${rpm.base}/SPECS"/>
- <mkdir dir="${rpm.base}/SRPMS"/>
- <mkdir dir="${rpm.base}/tmp"/>
- <mkdir dir="${rpm.base}/tmp/NAnt-src"/>
- <mkdir dir="${rpm.base}/tmp/NAnt-tar"/>
- </target>
-
- <target name="prepare-rpm" depends="setup-rpm" description="Prepare the binaries for packaging.">
- <copy todir="${rpm.base}/tmp/NAnt-src">
- <fileset basedir="${build.dir}">
- <include name="bin/**"/>
- <!--include name="doc/**"/-->
- <!--include name="examples/**"/-->
- </fileset>
- </copy>
-
- <exec program="bash">
- <arg line="-c -o onecmd"/>
- <arg value="'tar -cvzf ${cygwin.rpm.base}/tmp/NAnt-tar/NAnt.tar.gz ${cygwin.rpm.base}/tmp/NAnt-src bin'"/>
- </exec>
-
- <copy file="${rpm.base}/tmp/NAnt-tar/NAnt.tar.gz" tofile="${rpm.base}/SOURCES/NAnt.tar.gz" overwrite="true"/>
- <copy file="${build.dir}/NAnt.spec" tofile="${rpm.base}/SPECS/NAnt.spec" overwrite="true"/>
- </target>
-
- <target name="binary-rpm" description="Build the binary rpm for NAnt.">
- <property name="commandline" value="rpmbuild -ba --buildroot=${cygwin.rpm.base}/tmp ${cygwin.rpm.base}/SPECS/NAnt.spec"/>
- <echo file="${rpm.base}/build.bat">bash -c '${commandline}'</echo>
-
- <exec program="bash">
- <arg line="-c -o onecmd '${commandline}'"/>
- </exec>
-
- <copy todir="${build.dir}" flatten="true">
- <fileset basedir="${rpm.base}/RPMS">
- <include name="**/*.rpm"/>
- </fileset>
- </copy>
- </target>
</project>
Please sign in to comment.
Something went wrong with that request. Please try again.