User:Kalev/MinGW old specfile

From FedoraProject

< User:Kalev(Difference between revisions)
Jump to: navigation, search
(Initial spec file from https://fedoraproject.org/wiki/User:Tibbs/MinGW_Old)
 
(%define -> %global, added -debuginfo subpackage, removed unnecessary version from BR: mingw32-filesystem, use %setup -q -n, make %{?_smp_mflags}, add COPYING to %doc)
 
Line 1: Line 1:
 
== Example Specfile ==
 
== Example Specfile ==
 
<pre>
 
<pre>
%define __strip %{_mingw32_strip}
+
%global __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
+
%global __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
+
%global _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
+
%global __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
+
%global __find_provides %{_mingw32_findprovides}
 +
%define __debug_install_post %{_mingw32_debug_install_post}
  
 
Name:          mingw-example
 
Name:          mingw-example
Line 19: Line 20:
 
BuildArch:      noarch
 
BuildArch:      noarch
  
BuildRequires:  mingw32-filesystem >= 23
+
BuildRequires:  mingw32-filesystem
 
BuildRequires:  mingw32-gcc
 
BuildRequires:  mingw32-gcc
 
BuildRequires:  mingw32-binutils
 
BuildRequires:  mingw32-binutils
Line 31: Line 32:
 
%description -n mingw32-example
 
%description -n mingw32-example
 
# description
 
# description
 +
 +
 +
%{?_mingw32_debug_package}
 +
  
 
%prep
 
%prep
%setup -q
+
%setup -q -n example-%{version}
  
  
 
%build
 
%build
 
%{_mingw32_configure}
 
%{_mingw32_configure}
make
+
make %{?_smp_mflags}
  
  
Line 46: Line 51:
 
# Remove static libraries but DON'T remove *.dll.a files.
 
# Remove static libraries but DON'T remove *.dll.a files.
 
rm $RPM_BUILD_ROOT%{mingw32_libdir}/libfoo.a
 
rm $RPM_BUILD_ROOT%{mingw32_libdir}/libfoo.a
 +
  
 
%files -n mingw32-example
 
%files -n mingw32-example
 +
%doc COPYING
 
%{_mingw32_bindir}/foo.dll
 
%{_mingw32_bindir}/foo.dll
 
%{_mingw32_libdir}/foo.dll.a
 
%{_mingw32_libdir}/foo.dll.a

Latest revision as of 17:36, 11 May 2011

[edit] Example Specfile

%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}

Name:           mingw-example
Version:        1.2.3
Release:        1%{?dist}
Summary:        

License:        LGPLv2+
Group:          Development/Libraries
URL:            
Source0:        

BuildArch:      noarch

BuildRequires:  mingw32-filesystem
BuildRequires:  mingw32-gcc
BuildRequires:  mingw32-binutils
# Any additional BuildRequires.

%description
# description

%package -n mingw32-example
Summary:
%description -n mingw32-example
# description


%{?_mingw32_debug_package}


%prep
%setup -q -n example-%{version}


%build
%{_mingw32_configure}
make %{?_smp_mflags}


%install
make DESTDIR=$RPM_BUILD_ROOT install

# Remove static libraries but DON'T remove *.dll.a files.
rm $RPM_BUILD_ROOT%{mingw32_libdir}/libfoo.a


%files -n mingw32-example
%doc COPYING
%{_mingw32_bindir}/foo.dll
%{_mingw32_libdir}/foo.dll.a
# etc.


%changelog
* Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.3-1
- Initial RPM release.