1. Colin Woodbury
  2. aura

Commits

Colin Woodbury  committed 4975fb0

Extended `--auradebug` - Moved makedepends to depends in PKGBUILD

  • Participants
  • Parent commits b1fd551
  • Branches master

Comments (0)

Files changed (5)

File NOTES

View file
  • Ignore whitespace
 OPTIONS TO IMPLEMENT
 --------------------
 -Ci -> `--info` Gives some stats about the package cache.
--   -> `--philosophy` Outputs the aura philosophy.
--   -> `--tutorial` Teach new users how to build packages from scratch.
 
 OUT OF DATE
 -----------

File PKGBUILD

View file
  • Ignore whitespace
 url="https://github.com/fosskers/aura"
 license=('GPL-3')
 arch=('i686' 'x86_64')
-makedepends=('ghc' 'haskell-regex-base' 'haskell-regex-pcre' 'haskell-json'
-             'haskell-curl')
-depends=('gmp' 'pacman')
+depends=('gmp' 'pacman' 'ghc' 'haskell-regex-base' 'haskell-regex-pcre' 
+         'haskell-curl' 'haskell-json')
 optdepends=('pacman-color: For coloured pacman output in Aura.')
 options=('strip')
 source=(https://github.com/downloads/fosskers/aura/${_hkgname}-${pkgver}.tar.gz)

File Shell.hs

View file
  • Ignore whitespace
 ------------------
 -- COLOURED OUTPUT
 ------------------
+{-
++int _set_color_sequence(const char* name, char* dest)
++{
++	int ret = 0;
++
++	if(strcmp(name, "black") == 0) {
++		strncpy(dest, "\033[0;30m", COLOR_LEN);
++	} else if(strcmp(name, "red") == 0) {
++		strncpy(dest, "\033[0;31m", COLOR_LEN);
++	} else if(strcmp(name, "green") == 0) {
++		strncpy(dest, "\033[0;32m", COLOR_LEN);
++	} else if(strcmp(name, "yellow") == 0) {
++		strncpy(dest, "\033[0;33m", COLOR_LEN);
++	} else if(strcmp(name, "blue") == 0) {
++		strncpy(dest, "\033[0;34m", COLOR_LEN);
++	} else if(strcmp(name, "magenta") == 0) {
++		strncpy(dest, "\033[0;35m", COLOR_LEN);
++	} else if(strcmp(name, "cyan") == 0) {
++		strncpy(dest, "\033[0;36m", COLOR_LEN);
++	} else if(strcmp(name, "white") == 0) {
++		strncpy(dest, "\033[0;37m", COLOR_LEN);
++	} else if(strcmp(name, "gray") == 0) {
++		strncpy(dest, "\033[1;30m", COLOR_LEN);
++	} else if(strcmp(name, "intensive red") == 0) {
++		strncpy(dest, "\033[1;31m", COLOR_LEN);
++	} else if(strcmp(name, "intensive green") == 0) {
++		strncpy(dest, "\033[1;32m", COLOR_LEN);
++	} else if(strcmp(name, "intensive yellow") == 0) {
++		strncpy(dest, "\033[1;33m", COLOR_LEN);
++	} else if(strcmp(name, "intensive blue") == 0) {
++		strncpy(dest, "\033[1;34m", COLOR_LEN);
++	} else if(strcmp(name, "intensive magenta") == 0) {
++		strncpy(dest, "\033[1;35m", COLOR_LEN);
++	} else if(strcmp(name, "intensive cyan") == 0) {
++		strncpy(dest, "\033[1;36m", COLOR_LEN);
++	} else if(strcmp(name, "intensive white") == 0) {
++		strncpy(dest, "\033[1;37m", COLOR_LEN);
++	} else if(strcmp(name, "intensive foreground") == 0) {
++		strncpy(dest, "\033[m\033[1m", COLOR_LEN);
++	} else if(strcmp(name, "none") == 0) {
++		strncpy(dest, "\033[m", COLOR_LEN);
++	} else {
++		ret = 1;
++	}
++	dest[COLOR_LEN] = '\0';
++	return(ret);
++-}
+
 data Colour = NoColour | Red | Green | Yellow | Blue | Magenta | Cyan
             deriving (Eq,Enum)
 
 
 -- This will get the true user name regardless of sudo-ing.
 getTrueUser :: Environment -> String
-getTrueUser env | isTrueRoot env = "root"
-                | otherwise      = getSudoUser' env
+getTrueUser env | isTrueRoot env  = "root"
+                | hasRootPriv env = getSudoUser' env
+                | otherwise       = getUser' env
 
 getEditor :: Environment -> String
 getEditor env = case getEnvVar "EDITOR" env of

File aura.hs

View file
  • Ignore whitespace
   let yn a = if a then "Yes!" else "No."
       env  = environmentOf ss
       pac  = case getEnvVar "PACMAN" env of Nothing -> "pacman"; Just c -> c
-  mapM_ putStrLn [ --"True User         => " ++ getTrueUser env
-                   "Using Sudo?       => " ++ yn (varExists "SUDO_USER" env)
+  mapM_ putStrLn [ "User              => " ++ getUser' env
+                 , "True User         => " ++ getTrueUser env
+                 , "Using Sudo?       => " ++ yn (varExists "SUDO_USER" env)
                  , "Language          => " ++ show (langOf ss)
                  , "Pacman Command    => " ++ pac
                  , "Ignored Pkgs      => " ++ unwords (ignoredPkgsOf ss)

File changelog.txt

View file
  • Ignore whitespace
 Aura Changelog
 ==============
 
+1.0.?.?
+-------
+- Moved haskell dependencies out of `makedepends` field and into
+  `depends` field in PKGBUILD. Makedepends can usually be ignored
+  after building, but haskell packages are a pain to rebuild
+  and reregister at every build. It's more realistic to just keep
+  them installed. This is what other haskell packages in the AUR
+  do as well.
+
+1.0.3.1
+-------
+- Added `--auradebug` option.
+
 1.0.3.0
 -------
 - Compatibility with AUR 2.0 added.