2 # %%define <name> <expansion>
4 %define Version @VERSION@
6 %define Prefix /usr
/local
7 %define ExecPrefix
/usr
/local
8 Summary: dockable clock applet
for Window Maker
14 Group: User Interface
/X
15 URL: http
://www.bluestop.org
/wmclock
/
16 Source0: http
://www.bluestop.org
/wmclock
/%{Name}-%{Version}.tar.gz
19 BuildRoot: /tmp
/%{Name}-%{Version}-%{Release}-root
25 Wmclock is an applet which displays the date and
time in a dockable
26 tile
in the same style as the clock from the NEXTSTEP
(tm
) operating
27 system. Wmclock is specially designed
for the Window Maker window
28 manager
, by Alfredo Kojima
, and features multiple language support
,
29 twenty
-four
-hour and twelve
-hour
(am
/pm
) time display
, and
, optionally
,
30 can run a user
-specified program on a mouse click. Wmclock is derived
31 from asclock
, a similar clock
for the AfterStep window manager.
43 # [ -z "${suf}" ] && suf='~'
44 # mv -f ${fil} ${fil}${suf}
45 # cat ${fil}${suf} | sed -e "s${sep}${old}${sep}${new}${sep}g" >$fil
49 if [ -z "$
{CC
}"
]; then
50 if [ -n "`which gcc`"
]; then
58 .
/configure
--lang english
59 make CC
="$
{CC
}" CDEBUGFLAGS
="$
{RPM_OPT_FLAGS
}"
62 function CheckBuildRoot
() {
63 # do a few sanity checks on the BuildRoot
64 # to make sure we don't damage a system
65 case "$
{RPM_BUILD_ROOT
}"
in
66 ''|' '|
/|
/bin|
/boot|
/dev|
/etc|
/home|
/lib|
/mnt|
/root|
/sbin|
/tmp|
/usr|
/var
)
67 echo "Yikes
! Don't use '$
{RPM_BUILD_ROOT
}'
for a
BuildRoot!"
68 echo "The
BuildRoot gets deleted when this package is rebuilt
;"
69 echo "something like '
/tmp
/build
-blah' is a better choice."
76 function CleanBuildRoot
() {
77 if CheckBuildRoot
; then
78 rm -rf "$
{RPM_BUILD_ROOT
}"
88 %{Prefix}/share/%{Name} \
91 mkdir -p "$
{RPM_BUILD_ROOT
}$
{i
}"
94 make DESTDIR
="$
{RPM_BUILD_ROOT
}"
install
95 make DESTDIR
="$
{RPM_BUILD_ROOT
}"
install.man
96 make DESTDIR
="$
{RPM_BUILD_ROOT
}"
install.share
99 function CheckBuildRoot
() {
100 # do a few sanity checks on the BuildRoot
101 # to make sure we don't damage a system
102 case "$
{RPM_BUILD_ROOT
}"
in
103 ''|' '|
/|
/bin|
/boot|
/dev|
/etc|
/home|
/lib|
/mnt|
/root|
/sbin|
/tmp|
/usr|
/var
)
104 echo "Yikes
! Don't use '$
{RPM_BUILD_ROOT
}'
for a
BuildRoot!"
105 echo "The
BuildRoot gets deleted when this package is rebuilt
;"
106 echo "something like '
/tmp
/build
-blah' is a better choice."
113 function CleanBuildRoot
() {
114 if CheckBuildRoot
; then
115 rm -rf "$
{RPM_BUILD_ROOT
}"
123 %attr(- ,root
,root
) %doc COPYING ChangeLog INSTALL README
124 %attr(0755,root
,root
) %{ExecPrefix}/bin
/wmclock
125 %attr(0755,root
,root
) %{ExecPrefix}/man
/man1
/wmclock
.1*
126 %attr(0755,root
,root
) %dir %{Prefix}/share
/wmclock
127 %attr(- ,root
,root
) %{Prefix}/share
/wmclock
/*