Skip to content

Commit

Permalink
updated to Makefile construct
Browse files Browse the repository at this point in the history
  • Loading branch information
graysky2 committed Mar 16, 2013
1 parent 7fa8e20 commit 2085085
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 49 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v2.21
16-Mar-2013
CHange to Makefile construct.

v2.20
10-Mar-2013
Name change of manpage.
Expand Down
15 changes: 15 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BUILDING
There is no configure script nor is there anything to compile.

Setup the via a make.

$ make

Running a `make install` as root will distribute the files to
the filesystem.

# make install

If you wish to contribute to other distros, fork this project
on github and submit a pull request:
https://github.com/graysky2/backdrop-randomizer
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2013 graysky

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
VERSION = 2.21
PN = backdrop-randomizer
PN_SHORT = bdr

PREFIX ?= /usr
CONFDIR = /etc
BINDIR = $(PREFIX)/bin
DOCDIR = $(PREFIX)/share/doc/$(PN)-$(VERSION)
MANDIR = $(PREFIX)/share/man/man1

RM = rm
Q = @

all:
$(Q)echo -e '\033[1;32mSetting version\033[0m'
$(Q)sed -i -e 's/@VERSION@/'$(VERSION)'/' common/$(PN)

install-bin:
$(Q)echo -e '\033[1;32mInstalling main script...\033[0m'
install -Dm755 common/$(PN) "$(DESTDIR)$(BINDIR)/$(PN)"
ln -s $(PN) "$(DESTDIR)$(BINDIR)/$(PN_SHORT)"

install-man:
$(Q)echo -e '\033[1;32mInstalling manpage...\033[0m'
install -Dm644 doc/$(PN).1 "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1"
gzip -9 "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1"
ln -s $(PN_SHORT).1.gz "$(DESTDIR)$(MANDIR)/$(PN).1.gz"

install: install-bin install-man

uninstall:
$(Q)$(RM) "$(DESTDIR)$(BINDIR)/$(PN)"
$(Q)$(RM) "$(DESTDIR)$(BINDIR)/$(PN_SHORT)"
$(Q)$(RM) "$(DESTDIR)$(MANDIR)/$(PN).1.gz"
$(Q)$(RM) "$(DESTDIR)$(MANDIR)/$(PN_SHORT).1.gz"
46 changes: 0 additions & 46 deletions README-for_other_distros

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Xfdesktop has a gap currently: it does not keep track of which images in a list
Each time you or cron calls the script, it will randomly select a picture from your list to display. It will then remove the selection from the list so as not to repeat the same pic twice per cycle. When backdrop-randomizer sees you have only one pic left in your list, it regenerates the list anew and continues to cycle. The net effect is an endless rotation of your pics without a repeat.

##Usage
* Copy the script to wherever you wish (/usr/bin for example).
* Call the script to create $XDG_CONFIG_HOME/backdrop-randomizer.conf wherein you will define your options..
* Right-click the xfce4 desktop and select Desktop Settings > Background.
* Setup the image to "Single image" and select the symlink that the script made for you which is by default: $XDG_CONFIG_HOME/backdrop-randomizer.jpg
Expand Down
2 changes: 1 addition & 1 deletion backdrop-randomizer → common/backdrop-randomizer
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# see manpage for usage
#

VERS="2.19"
VERS="@VERSION@"
export BLD="\e[01m" RED="\e[01;31m" GRN="\e[01;32m" YLW="\e[01;33m" NRM="\e[00m"

[[ -z "$XDG_CONFIG_HOME" ]] && XDG_CONFIG_HOME="$HOME/.config" # make sure env var is setup correctly
Expand Down
2 changes: 1 addition & 1 deletion backdrop-randomizer.1 → doc/backdrop-randomizer.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH backdrop-randomizer 1 "14 November 2012" "" ""
.TH backdrop-randomizer 1 "16 March 2013" "" ""
.SH NAME
\fBbackdrop-randomizer \fP- Companion for xfdesktop which randomly cycles through wallpapers without repeating them until all have been displayed once.
\fB
Expand Down

0 comments on commit 2085085

Please sign in to comment.