import (#1009375)
This commit is contained in:
		
							parent
							
								
									d0c2645528
								
							
						
					
					
						commit
						83b037a077
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -0,0 +1 @@ | ||||
| /hslua-0.3.6.1.tar.gz | ||||
							
								
								
									
										82
									
								
								ghc-hslua.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								ghc-hslua.spec
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,82 @@ | ||||
| # https://fedoraproject.org/wiki/Packaging:Haskell | ||||
| 
 | ||||
| %global pkg_name hslua | ||||
| 
 | ||||
| Name:           ghc-%{pkg_name} | ||||
| Version:        0.3.6.1 | ||||
| Release:        2%{?dist} | ||||
| Summary:        Lua language interpreter embedding in Haskell | ||||
| 
 | ||||
| License:        BSD | ||||
| URL:            http://hackage.haskell.org/package/%{pkg_name} | ||||
| Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz | ||||
| Patch1:         hslua-system-lua.patch | ||||
| 
 | ||||
| BuildRequires:  ghc-Cabal-devel | ||||
| BuildRequires:  ghc-rpm-macros | ||||
| # Begin cabal-rpm deps: | ||||
| BuildRequires:  ghc-mtl-devel | ||||
| BuildRequires:  pkgconfig(lua) | ||||
| # End cabal-rpm deps | ||||
| 
 | ||||
| %description | ||||
| The Scripting.Lua module is a wrapper of Lua language interpreter as described | ||||
| in www.lua.org. | ||||
| 
 | ||||
| 
 | ||||
| %package devel | ||||
| Summary:        Haskell %{pkg_name} library development files | ||||
| Provides:       %{name}-static = %{version}-%{release} | ||||
| Requires:       ghc-compiler = %{ghc_version} | ||||
| Requires(post): ghc-compiler = %{ghc_version} | ||||
| Requires(postun): ghc-compiler = %{ghc_version} | ||||
| Requires:       %{name}%{?_isa} = %{version}-%{release} | ||||
| # Begin cabal-rpm deps: | ||||
| Requires:       pkgconfig(lua) | ||||
| # End cabal-rpm deps | ||||
| 
 | ||||
| %description devel | ||||
| This package provides the Haskell %{pkg_name} library development files. | ||||
| 
 | ||||
| 
 | ||||
| %prep | ||||
| %setup -q -n %{pkg_name}-%{version} | ||||
| %patch1 -p1 -b .orig | ||||
| 
 | ||||
| cabal-tweak-flag system-lua True | ||||
| rm src/*.c src/*.h | ||||
| 
 | ||||
| 
 | ||||
| %build | ||||
| %ghc_lib_build | ||||
| 
 | ||||
| 
 | ||||
| %install | ||||
| %ghc_lib_install | ||||
| 
 | ||||
| 
 | ||||
| %post devel | ||||
| %ghc_pkg_recache | ||||
| 
 | ||||
| 
 | ||||
| %postun devel | ||||
| %ghc_pkg_recache | ||||
| 
 | ||||
| 
 | ||||
| %files -f %{name}.files | ||||
| %doc COPYRIGHT | ||||
| 
 | ||||
| 
 | ||||
| %files devel -f %{name}-devel.files | ||||
| 
 | ||||
| 
 | ||||
| %changelog | ||||
| * Wed Oct 16 2013 Jens Petersen <petersen@redhat.com> - 0.3.6.1-2 | ||||
| - add static provides to devel | ||||
| 
 | ||||
| * Wed Sep 18 2013 Jens Petersen <petersen@redhat.com> - 0.3.6.1-1 | ||||
| - summary and description | ||||
| - patch to use system lua | ||||
| 
 | ||||
| * Wed Sep 18 2013 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.3.6.1-0 | ||||
| - spec file generated by cabal-rpm-0.8.3 | ||||
							
								
								
									
										30
									
								
								hslua-system-lua.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								hslua-system-lua.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| --- hslua-0.3.6.1/hslua.cabal.orig	2013-06-18 15:02:48.000000000 +0900
 | ||||
| +++ hslua-0.3.6.1/hslua.cabal	2013-09-18 18:34:30.652499112 +0900
 | ||||
| @@ -21,18 +21,25 @@
 | ||||
|    type:                 git | ||||
|    location:             https://github.com/osa1/hslua.git | ||||
|   | ||||
| +flag system-lua
 | ||||
| +  description: Use the system-wide lua instead of the bundled copy
 | ||||
| +  default: False
 | ||||
| +
 | ||||
|  Library | ||||
|    Build-depends:        base==4.*, mtl >= 2.1 | ||||
|    Exposed-modules:      Scripting.Lua, Scripting.Lua.ConfigFile | ||||
|    Hs-source-dirs:       src | ||||
| -  C-sources:            src/lapi.c, src/lauxlib.c, src/lbaselib.c, src/lcode.c,
 | ||||
| +  if flag(system-lua)
 | ||||
| +    Pkgconfig-depends:    lua
 | ||||
| +  else
 | ||||
| +    C-sources:          src/lapi.c, src/lauxlib.c, src/lbaselib.c, src/lcode.c,
 | ||||
|                          src/ldblib.c, src/ldebug.c, src/ldo.c, src/ldump.c, src/lfunc.c, | ||||
|                          src/lgc.c, src/linit.c, src/liolib.c, src/llex.c, src/lmathlib.c, | ||||
|                          src/lmem.c, src/loadlib.c, src/lobject.c, src/lopcodes.c, | ||||
|                          src/loslib.c, src/lparser.c, src/lstate.c, src/lstring.c, | ||||
|                          src/lstrlib.c, src/ltable.c, src/ltablib.c, src/ltm.c, | ||||
|                          src/lundump.c, src/lvm.c, src/lzio.c, src/ntrljmp.c | ||||
| -  Include-dirs:         src
 | ||||
| +    Include-dirs:       src
 | ||||
|   | ||||
|    if os(linux) | ||||
|      CC-Options:         "-DLUA_USE_LINUX" | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user