diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-13 16:36:26 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-13 16:36:26 -0200 |
commit | 8eba14b29abd2ce680d3dab6ba6f6cd0a6b5b918 (patch) | |
tree | 6f8599f56b8e678f80a534bdb3139ef57d69df32 /pcr/cw | |
parent | 21ae83de97da28975c4ccf6208ed0454532852b5 (diff) | |
parent | e242c9f418786fb9d279119045d881aaec0a7ce4 (diff) | |
download | abslibre-8eba14b29abd2ce680d3dab6ba6f6cd0a6b5b918.tar.gz abslibre-8eba14b29abd2ce680d3dab6ba6f6cd0a6b5b918.tar.bz2 abslibre-8eba14b29abd2ce680d3dab6ba6f6cd0a6b5b918.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/cw')
-rw-r--r-- | pcr/cw/PKGBUILD | 46 | ||||
-rw-r--r-- | pcr/cw/cw.install | 26 | ||||
-rw-r--r-- | pcr/cw/cw.patch | 78 |
3 files changed, 150 insertions, 0 deletions
diff --git a/pcr/cw/PKGBUILD b/pcr/cw/PKGBUILD new file mode 100644 index 000000000..fb26acb4a --- /dev/null +++ b/pcr/cw/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: William Díaz <wdiaz[at]archlinux[dot]us> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=cw +pkgver=1.0.16 +pkgrel=1 +pkgdesc="A non-intrusive ANSI color wrapper for common unix-based commands on GNU/linux." +url="http://sourceforge.net/projects/cwrapper/" +license=('GPL2') +arch=('i686' 'x86_64') +depends=() +makedepends=('patch') +install=cw.install +source=("http://cwrapper.sourceforge.net/${pkgname}-${pkgver}.tar.bz2" + "${pkgname}.patch") +md5sums=('142a1e9a25abbb01c3b90091d0bf68fd' + '5c54fab22fdb0601e6e4fb3fa87c435d') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -d ${pkgdir}/usr/bin \ + ${pkgdir}/usr/share/man/man1 \ + ${pkgdir}/usr/share/doc/cw + + msg "Patching Files" + patch -Np1 -i ${srcdir}/${pkgname}.patch || return 1 + + ./configure --prefix=/usr || return 1 +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install || return 1 + + # Deleting the problematic files + rm -R ${pkgdir}/usr/lib/${pkgname}/{file,gcc,g++,stat,du} + + cp CHANGES CONTRIB INSTALL README PLATFORM \ + ${pkgdir}/usr/share/doc/cw + + ln -sf /usr/bin/cw ${pkgdir}/usr/bin/cwe +} +md5sums=('142a1e9a25abbb01c3b90091d0bf68fd' + '5c54fab22fdb0601e6e4fb3fa87c435d') diff --git a/pcr/cw/cw.install b/pcr/cw/cw.install new file mode 100644 index 000000000..bf0219bb7 --- /dev/null +++ b/pcr/cw/cw.install @@ -0,0 +1,26 @@ +post_install () { + echo -e "\033[32;1m==>\033[0m \033[1mUpdating definition files...\033[0m" + /usr/bin/cwu /usr/lib/cw /usr/bin/cw > /dev/null + + echo -e "" + echo -e "Complete, definitions are stored in: /usr/lib/cw" + echo -e "\033[1mFor bash:\033[0m place 'export PATH=\"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.bash_profile(or /etc/profile globally)" + echo -e "" + echo -e "\033[1mFor tcsh:\033[0m place 'setenv PATH \"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.login(or /etc/csh.login globally)" + echo -e "" + echo -e "\033[1mFor zsh:\033[0m place:" + echo -e "'export PATH=\"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.zshrc(or /etc/zprofile globally)" + echo -e "" + echo -e "Or to automate the two lines above use the "colorcfg" command." + echo -e "(and add optional anti-coloring precautions)" + echo -e "Once the desired shell(s) are setup, use the "color" command," + echo -e "or the environmental variable NOCOLOR=1 to turn" + echo -e "color wrapping on and off." +} + +post_upgrade() { + post_install +} diff --git a/pcr/cw/cw.patch b/pcr/cw/cw.patch new file mode 100644 index 000000000..2158a0d30 --- /dev/null +++ b/pcr/cw/cw.patch @@ -0,0 +1,78 @@ +--- cw-1.0.16/Makefile.in 2007-09-25 11:10:20.000000000 -0600 ++++ cw-1.0.16/Makefile.in 2009-12-23 00:22:47.932698402 -0600 +@@ -8,7 +8,7 @@ CC=@CC@ + ECHO=echo + LN=ln + RM=rm +-MKDIR=mkdir ++MKDIR=mkdir -p + INSTALL=@INSTALL@ + + all: +@@ -56,32 +56,18 @@ installlocal: cleanlocal local + + install: cleanpub cw cwu + @$(ECHO) "* Installing color wrapper..." +- @for FILE in bin/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(BINDIR);done +- @$(LN) -sf $(BINDIR)/cw $(BINDIR)/cwe ++ @for FILE in bin/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(BINDIR);done ++ @$(LN) -sf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwe + @$(ECHO) "* Installing color wrapper generic definition files..." +- @$(MKDIR) -m 755 $(LIBDIR)/cw/ +- @for FILE in def/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(LIBDIR)/cw/;done ++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/ ++ @for FILE in def/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(LIBDIR)/cw/;done + @$(ECHO) "* Installing color wrapper generic header/footer files..." +- @$(MKDIR) -m 755 $(LIBDIR)/cw/etc +- @for FILE in etc/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(LIBDIR)/cw/etc;done ++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/etc ++ @for FILE in etc/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(LIBDIR)/cw/etc;done + @$(ECHO) "* Installing manual pages..." +- @for FILE in man/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(MANDIR)/man1/;done ++ @for FILE in man/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(MANDIR)/man1/;done + @$(ECHO) "* Updating definition files..." +- @$(BINDIR)/cwu $(LIBDIR)/cw $(BINDIR)/cw +- @$(ECHO) "-----------------------------------------------------------" +- @$(ECHO) "* Complete, definitions are stored in: $(LIBDIR)/cw" +- @$(ECHO) "* For bash: place 'export PATH=\"$(LIBDIR)/cw:\$$PATH\"'"\ +- "at the end of ~/.bash_profile(or /etc/profile globally)" +- @$(ECHO) "* For tcsh: place 'setenv PATH \"$(LIBDIR)/cw:\$$PATH\"'"\ +- "at the end of ~/.login(or /etc/csh.login globally)" +- @$(ECHO) "* Or to automate the two lines above use the"\ +- "\"colorcfg\" command. (and add optional anti-coloring precautions)" +- @$(ECHO) "* Once the desired shell(s) are setup, use the"\ +- "\"color\" command, or the environmental variable NOCOLOR=1 to turn"\ +- "color wrapping on and off." +- @$(ECHO) "" +- @$(ECHO) "* PLEASE view the ./README file for more information if"\ +- "you haven't already." ++ @$(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(BINDIR)/cw + + clean: + @$(ECHO) "* Cleaning compiling content..." +@@ -94,9 +80,9 @@ cleanlocal: + + cleanpub: + @$(ECHO) "* Cleaning cw and cwu binaries, and definitions..." +- @$(RM) -rf $(BINDIR)/cw $(BINDIR)/cwu $(BINDIR)/cwe\ +- $(BINDIR)/cw.exe $(BINDIR)/cwu.exe $(BINDIR)/color $(BINDIR)/colorcfg\ +- $(LIBDIR)/cw $(MANDIR)/man1/cw.1.gz $(MANDIR)/man1/cwu.1.gz\ +- $(MANDIR)/man1/cwe.1.gz ++ @$(RM) -rf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(BINDIR)/cwe\ ++ $(DESTDIR)$(BINDIR)/cw.exe $(DESTDIR)$(BINDIR)/cwu.exe $(DESTDIR)$(BINDIR)/color $(DESTDIR)$(BINDIR)/colorcfg\ ++ $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(MANDIR)/man1/cw.1.gz $(DESTDIR)$(MANDIR)/man1/cwu.1.gz\ ++ $(DESTDIR)$(MANDIR)/man1/cwe.1.gz + + cleanall: clean cleanlocal cleanpub + +--- cw-1.0.16/bin/colorcfg 2007-09-25 11:10:20.000000000 -0600 ++++ cw-1.0.16/bin/colorcfg 2009-12-23 00:29:05.105994275 -0600 +@@ -12,7 +12,7 @@ if test -x "${HOME}/.cw/bin/colorcfg";th + else + SED="`which sed 2>/dev/null`" + if test -z "$SED";then +- CWLIB="/usr/local/lib/cw" ++ CWLIB="/usr/lib/cw" + echo "(NOTE: using static cw library path, this could be invalid)" + else + CWLIB="`echo \"$0/lib/cw\"|sed \"s/\/bin\/colorcfg//g\"`" |