Add a shortcut to a local Slackware repo.
[pkgusr] / etc / pkgusr / bash_profile
1 # -*- shell-script -*-
2 # couple of environment settings to ensure sanity
3 set +h
4 umask 022
5 LC_ALL=POSIX
6
7 ## PATH
8 # The wrappers directory must be the first entry in the PATH.  
9 #
10 # Once you are no longer needing or using the tools dir you can remove it
11 # from the PATH if you want, but leaving it there won't hurt.
12 #PATH=/usr/lib/pkgusr:/usr/bin:/bin:/usr/X11R6/bin:/opt/qt/bin:/tools/bin
13 PATH=/usr/lib/pkgusr:/usr/bin:/bin:/usr/X11R6/bin:/opt/qt/bin
14
15 ## A couple things to make less(1) nicer.
16 LESS='-MRgiswFX'
17 LESSCHARSET=utf-8
18 LESSOPEN='|lesspipe.sh %s'
19
20 ## Timezone -- set to your local zone
21 TZ='Australia/Brisbane'
22
23 ## QT
24 QTDIR=/opt/qt
25
26 ## pkg-config
27 _XORG=/usr/X11R6/lib/pkgconfig:/usr/X11R6/share/pkgconfig
28 _KDE=/opt/kde/lib/pkgconfig:/opt/kde/share/pkgconfig
29 _QT=${QTDIR}/lib/pkgconfig
30 _PKGCFG=$(pkg-config --variable pc_path pkg-config)
31 PKG_CONFIG_PATH=${_PKGCFG}:${_XORG}:${_KDE}:${_QT}
32
33 # unset the tmp vars
34 unset _XORG _KDE _QT _PKGCFG
35
36 ## Locale directory suppression.
37 #  If this is set to `1' (one) then the install and mkdir wrappers
38 #  won't put anything in /usr/share/locale.  Technically, the mkdir
39 #  wrapper still creates the dir, but it is removed afterward.  If
40 #  you want to override this behaviour globally, set this to `0'
41 #  (zero) here, or you can override an individual package by adding
42 #  `SUPPRESSLOCALEDIR=0' to that pkgusr's ~/.pkgusrrc.
43 #
44 #  See the comments in the install wrapper for more detail and
45 #  rationale.
46 SUPPRESSLOCALEDIR=1
47
48 ## Build script update checks
49 #  If this is set to `1' (one) a check is done to see if there is a
50 #  newer build script available that the pkgusr could update to.  If an
51 #  update is available a message is printed to stdout with instructions
52 #  of how to proceed.
53 #
54 #  Override this in ~/.pkgusrrc.
55 CHECKUPDATES=1
56
57 ## Slackware PKG local repo
58 #  Having a shortcut to a local Slackware PKG repo is very useful.
59 #  Pat Volkerding and his team are of a minority who actually know
60 #  what they are doing.  I always check Slackware for patches.
61 #
62 #  I get the Slack source via rsync.
63 #  See https://mirrors.slackware.com/mirrorlist/
64 #
65 #  Use:  find ${SLACKPKG} -iname pkgname\*
66 SLACKPKG=/home/steve/download/Slackware/slackware64-current/source
67 #  Obviously edit to suit your situation
68
69 ### export everything
70 export LC_ALL PATH LESS LESSCHARSET LESSOPEN TZ PKG_CONFIG_PATH QTDIR
71 export SUPPRESSLOCALEDIR CHECKUPDATES SLACKPKG
72
73 # Make prompt reflect that we are a package user.
74 export PROMPT_COMMAND='PS1="[pkgusr (\u)] \w> "'
75
76 # Suck in some handy shell functions
77 . /etc/pkgusr/handy_funcs
78
79 # If they exist, load any private settings.  This comes last so that
80 # we can override any system defaults if need be
81 if [ -f ${HOME}/.pkgusrrc ]; then
82     . ${HOME}/.pkgusrrc
83 fi
84
85 # Go to the home directory whenever we su to a package user.
86 cd
87
88 # Setup the git config if needed
89 if [[ ! -d ${HOME}/.config/git && -f ${HOME}/.gitconfig ]]; then
90     prep_git
91 fi
92
93 # Maybe check if the build script can be updated, but not on dumb
94 # terms so that TRAMP still works.
95 if [ ${CHECKUPDATES} -eq 1 -a "$TERM" != "dumb" ]; then
96     checkupdates
97 fi
98
99
100 # Local variables:
101 # sh-basic-offset: 4
102 # End: