Changeset e2b555c in adblock2privoxy for adblock2privoxy-utils/src/DebControl.hs


Ignore:
Timestamp:
Dec 25, 2015 7:46:19 PM (4 years ago)
Author:
Alexey Zubritskiy <a.zubritskiy@…>
Branches:
master
Children:
433b59c
Parents:
f53c7cf
Message:

Adapted to GHC 7.10, introduced stack build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • adblock2privoxy-utils/src/DebControl.hs

    rf53c7cf re2b555c  
    22module DebControl ( 
    33        createDebControl 
    4 )  
     4) 
    55where 
    6 import Control.Applicative  
    76import Control.Monad 
    87import Distribution.PackageDescription 
     
    109import CabalTemplate 
    1110import Data.Char 
     11import RootPath 
    1212 
    1313 
     
    1717        writeFile resultFile control 
    1818        when verbose $ putStrLn $ resultFile ++ " file created" 
    19          
     19 
    2020resultFile :: String 
    21 resultFile = "distribution/debbuild/DEBIAN/control" 
     21resultFile = rootPath ++ "distribution/debbuild/DEBIAN/control" 
     22 
     23prependSpace :: String -> String 
     24prependSpace = (' ':) 
     25 
     26emptyToDot :: String -> String 
     27emptyToDot [] = "." 
     28emptyToDot s = s 
     29 
     30description' :: PackageDescription -> String 
     31description' =  unlines.liftM (prependSpace.emptyToDot).lines.description 
    2232 
    2333template :: [[CabalValue]] 
    24 template = []  
     34template = [] 
    2535    ## "Package:         " # text.pkgName.package 
    2636    ## "Version:         " # text.pkgVersion.package 
    2737    ## "Depends:         libgmp10" 
    28     ## "Architecture:    any" 
     38    ## "Architecture:    #ARCH#" 
    2939    ## "Maintainer:      " # maintainer 
    3040    ## "Homepage:        " # homepage 
     
    3242    ## "Priority:        extra" 
    3343    ## "Recommends:      privoxy, nginx" 
    34     ## "Description:     " # synopsis # "\n" # description 
    35  
    36  
    37  
    38  
     44    ## "Description:     " # synopsis # "\n" # description' 
Note: See TracChangeset for help on using the changeset viewer.