* restructuring

--HG--
extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%404
This commit is contained in:
mathias 2005-05-02 11:49:19 +00:00
parent 39e5206ec7
commit 8b6f5c89cd
7 changed files with 51 additions and 23 deletions

View file

@ -1,4 +1,7 @@
Version 0.2 Version 0.2
2005-05-02:
* restructuring
2005-04-30: 2005-04-30:

1
README
View file

@ -54,6 +54,7 @@
gentoo-linux (pc and ppc with gcc3.4.3) gentoo-linux (pc and ppc with gcc3.4.3)
freebsd5.3 (pc gcc3.4.2) freebsd5.3 (pc gcc3.4.2)
slackware (pc, gcc3.3.5, shadow)
3. usage 3. usage
-------- --------

View file

@ -10,11 +10,8 @@ import sys
aklock_version = '0.2' aklock_version = '0.2'
aklock_optfile = 'scons.opts' aklock_optfile = 'scons.opts'
aklock_distfiles = ['aklock.c', 'akcursors.c', 'aklock.h', aklock_target = 'src/aklock'
'lock.bitmap', 'mask.bitmap',
'SConstruct', 'README', 'CHANGELOG' ]
aklock_sources = [ 'aklock.c', 'akcursors.c' ]
aklock_target = 'aklock'
Default(aklock_target) Default(aklock_target)
@ -34,43 +31,51 @@ Help(aklock_options.GenerateHelpText(aklock_env))
########################################################### ###########################################################
# #
# #
build = aklock_env.Copy()
if sys.platform == "linux2" or sys.platform == "linux-i386": if sys.platform == "linux2" or sys.platform == "linux-i386":
build.AppendUnique( aklock_env.AppendUnique(
CPPDEFINES = [ 'LINUX' ]) CPPDEFINES = [ 'LINUX' ])
build.AppendUnique( aklock_env.AppendUnique(
CPPDEFINES = [ 'VERSION=\\"'+aklock_version+'\\"' ], CPPDEFINES = [ 'VERSION=\\"'+aklock_version+'\\"' ],
CPPFLAGS = [ '-Wall' ], CPPFLAGS = [ '-Wall' ],
CPPPATH = [ '/usr/X11R6/include' ], CPPPATH = [ '/usr/X11R6/include' ],
LIBPATH = ['/usr/X11R6/lib'], LIBPATH = ['/usr/X11R6/lib'],
LIBS = [ 'X11', 'crypt' ]) LIBS = [ 'X11', 'crypt' ])
if build['debug']: if aklock_env['debug']:
build.AppendUnique( aklock_env.AppendUnique(
CPPDEFINES = [ 'DEBUG' ], CPPDEFINES = [ 'DEBUG' ],
LINKFLAGS = [ '-g' ], LINKFLAGS = [ '-g' ],
CPPFLAGS = [ '-g' ]) CPPFLAGS = [ '-g' ])
if build['pam']: if aklock_env['pam']:
build.AppendUnique( aklock_env.AppendUnique(
CPPDEFINES = [ 'PAM_PWD' ], CPPDEFINES = [ 'PAM_PWD' ],
LIBS = [ 'pam' ]) LIBS = [ 'pam' ])
if sys.platform == 'linux2' or sys.platform == 'linux-i386': if sys.platform == 'linux2' or sys.platform == 'linux-i386':
build.AppendUnique(LIBS = ['pam_misc']) aklock_env.AppendUnique(LIBS = ['pam_misc'])
if build['shadow']: if aklock_env['shadow']:
build.AppendUnique( aklock_env.AppendUnique(
CPPDEFINES = [ 'SHADOW_PWD' ]) CPPDEFINES = [ 'SHADOW_PWD' ])
aklock_program = build.Program(aklock_target, aklock_sources) aklock_program = SConscript(
build.AddPostAction(aklock_program, Chmod(aklock_target, 0755)) 'src/SConscript',
exports = ['aklock_env']
)
aklock_env.Install(aklock_env['prefix']+'/bin', aklock_program) aklock_env.Install(
aklock_env.Alias('install', aklock_env['prefix']+'/bin') aklock_env['prefix']+'/bin',
aklock_program
)
aklock_env.Alias(
'install',
aklock_env['prefix']+'/bin'
)
# TODO: add a "scons dist" command which builds a propper tarball # TODO: add a "scons dist" command which builds a propper tarball
#aklock_env.Alias('dist', aklock_env.Tar(aklock_target + '-' + aklock_version, #aklock_env.Alias('dist', aklock_env.Tar(aklock_target + '-' + aklock_version,

19
src/SConscript Normal file
View file

@ -0,0 +1,19 @@
#!/bin/env python
##########################################################
#
# scons - buildsystem for aklock
#
##########################################################
aklock_sources = [ 'aklock.c', 'akcursors.c' ]
Import('aklock_env')
build = aklock_env.Copy()
aklock = build.Program('aklock', aklock_sources)
build.AddPostAction(aklock, Chmod(aklock, 0755))
# vim:ft=python

View file

@ -24,11 +24,11 @@
/* ---------------------------------------------------------------- *\ /* ---------------------------------------------------------------- *\
\* ---------------------------------------------------------------- */ \* ---------------------------------------------------------------- */
#include "bitmaps/mini.bitmap" #include "../bitmaps/mini.bitmap"
#include "bitmaps/mini_mask.bitmap" #include "../bitmaps/mini_mask.bitmap"
#include "bitmaps/xtr.bitmap" #include "../bitmaps/xtr.bitmap"
#include "bitmaps/xtr_mask.bitmap" #include "../bitmaps/xtr_mask.bitmap"
/* ---------------------------------------------------------------- *\ /* ---------------------------------------------------------------- *\
\* ---------------------------------------------------------------- */ \* ---------------------------------------------------------------- */