Added yesod-platform and creation scripts

This commit is contained in:
Michael Snoyman 2012-03-15 14:00:44 +02:00
parent 94f85edea2
commit 18d4b98d41
6 changed files with 85 additions and 0 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ dist
client_session_key.aes
cabal-dev/
yesod/foobar/
yesod-platform/yesod-platform.cabal

25
yesod-platform/LICENSE Normal file
View File

@ -0,0 +1,25 @@
The following license covers this documentation, and the source code, except
where otherwise indicated.
Copyright 2010, Michael Snoyman. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

7
yesod-platform/Setup.lhs Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env runhaskell
> module Main where
> import Distribution.Simple
> main :: IO ()
> main = defaultMain

View File

@ -0,0 +1,7 @@
-- | This module contains nothing import, it just re-exports @Yesod@. It is
-- provided simply to make this a complete package.
module Yesod.Platform
( module Yesod
) where
import Yesod

10
yesod-platform/make-cabal.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash -e
#cabal update
if ! which cabal-nirvana-generate &>/dev/null
then
cabal install cabal-nirvana -fgenerate
fi
cabal-nirvana-generate yesod | runghc to-cabal.hs > yesod-platform.cabal

View File

@ -0,0 +1,35 @@
import Data.List (intercalate, isPrefixOf)
import Control.Applicative ((<$>))
main = do
pkgs <- map (intercalate " == ")
. filter (\xs -> not $ ["parsec"] `isPrefixOf` xs)
. map words
. filter (not . null)
. lines
<$> getContents
putStrLn "name: yesod-platform"
putStrLn "version: FIXME"
putStrLn "license: BSD3"
putStrLn "license-file: LICENSE"
putStrLn "author: Michael Snoyman <michael@snoyman.com>"
putStrLn "maintainer: Michael Snoyman <michael@snoyman.com>"
putStrLn "synopsis: Meta package for Yesod"
putStrLn "description: Instead of allowing version ranges of dependencies, this package requires specific versions to avoid dependency hell"
putStrLn "category: Web, Yesod"
putStrLn "stability: Stable"
putStrLn "cabal-version: >= 1.6"
putStrLn "build-type: Simple"
putStrLn "homepage: http://www.yesodweb.com/"
putStrLn ""
putStrLn "library"
putStrLn " build-depends: base >= 4 && < 5"
mapM_ go pkgs
putStrLn ""
putStrLn " exposed-modules: Yesod.Platform"
putStrLn ""
putStrLn "source-repository head"
putStrLn " type: git"
putStrLn " location: https://github.com/yesodweb/yesod"
go s = putStrLn $ concat [" , ", s]