cabal2arch 0.3.5 → 0.3.6
raw patch · 2 files changed
+40/−4 lines, 2 files
Files
- Main.hs +39/−3
- cabal2arch.cabal +1/−1
Main.hs view
@@ -13,7 +13,11 @@ -- Portability: -- --- TODO: LICENSE file might be missing.+-- TODO: if build-type: Configure, accurate C library dependecies+-- require downloading the source, and running configure+--+-- C libraries are dynamicall linked, should be listed in depends,+-- rather than makedepends import Distribution.PackageDescription import Distribution.PackageDescription.Configuration@@ -222,7 +226,7 @@ ,Dependency "template-haskell" (ThisVersion (Version [2,2,0,0] [])) ,Dependency "time" (ThisVersion (Version [1,1,2,0] [])) ,Dependency "unix" (ThisVersion (Version [2,3,0,0] []))- ,Dependency "xtml" (ThisVersion (Version [3000,0,2,1] []))+ ,Dependency "xhtml" (ThisVersion (Version [3000,0,2,1] [])) {- ALUT-2.1.0.0 cgi-3001.1.5.1 network-2.1.0.0 regex-base-0.72.0.1@@ -309,6 +313,7 @@ ,("curl", "curl") ,("freetype", "freetype2") ,("glib", "glib2")+ ,("wmflite", "libwmf") ,("jpeg", "libjpeg") ,("ldap", "libldap")@@ -344,6 +349,7 @@ ,"Hedi" ,"conjure" ,"cpphs"+ ,"backdropper" ] -- translate some library dependencies to gtk names@@ -366,6 +372,7 @@ ,"cairo" ,"glib" ,"gtk"+ ,"svgcairo" ] ------------------------------------------------------------------------@@ -395,6 +402,10 @@ <=> disp (arch_arch pkg) , text "makedepends" <=> disp (arch_makedepends pkg)+ , case arch_depends pkg of+ ArchList [] -> empty+ _ -> text "depends" <=> disp (arch_depends pkg)+ , text "options" <=> disp (arch_options pkg) , text "source" <=> dispNoQuotes (arch_source pkg) , case arch_install pkg of@@ -447,6 +458,14 @@ `mappend` anyClibraries + , arch_depends = + if not (isLibrary)+ then+ ArchList [ArchDep (Dependency "gmp" AnyVersion)]+ `mappend`+ anyClibraries+ else ArchList []+ -- need the dependencies of all flags that are on by default, for all libraries and executables -- Hackage programs only need their own source to build@@ -611,11 +630,23 @@ -- file should reside in the same directory as the PKGBUILD, and will be copied -- into the package by makepkg. It does not need to be included in the source -- array (e.g. install=pkgname.install).-+ --+ , arch_options :: ArchList ArchOptions+ -- ^+ -- This array allows you to override some of makepkg´s default behavior when+ -- building packages. To set an option, just include the option name in the+ -- options array. To reverse the default behavior, place an “!” at the front of+ -- the option. Only specify the options you specifically want to override, the+ -- rest will be taken from makepkg.conf(5). NOTE: force is a special option only+ -- used in a PKGBUILD(5), do not use it unless you know what you are doing. } deriving (Show, Eq) +data ArchOptions+ = Strip+ deriving (Show, Eq)+ -- -- | An empty PKGBUILD --@@ -637,6 +668,7 @@ -- sha1sums=('a08670e4c749850714205f425cb460ed5a0a56b2') , arch_build = [] , arch_install = Nothing -- executable+ , arch_options = ArchList [Strip] } where e = emptyPackageDescription@@ -646,6 +678,10 @@ newtype ArchDep = ArchDep Dependency deriving (Eq,Show)++instance Text ArchOptions where+ disp Strip = text "strip"+ parse = undefined -- the PKGBUILD version spec is less expressive than cabal, we can't -- really handle unions or intersections well yet.
cabal2arch.cabal view
@@ -1,5 +1,5 @@ name: cabal2arch-version: 0.3.5+version: 0.3.6 homepage: http://code.haskell.org/~dons/code/cabal2arch synopsis: Create Arch Linux packages from Cabal packages description: Create Arch Linux packages from Cabal packages