| 1 | # $Id: $ | 
|---|
| 2 | ## @file | 
|---|
| 3 | # | 
|---|
| 4 | # LIBC Unix Compartment Baselayout | 
|---|
| 5 | # | 
|---|
| 6 | # Copyright (c) 2005 knut st. osmundsen <bird@anduin.net> | 
|---|
| 7 | # | 
|---|
| 8 | # | 
|---|
| 9 | # This file is part of InnoTek LIBC. | 
|---|
| 10 | # | 
|---|
| 11 | # InnoTek LIBC is free software; you can redistribute it and/or modify | 
|---|
| 12 | # it under the terms of the GNU Lesser General Public License as published | 
|---|
| 13 | # by the Free Software Foundation; either version 2 of the License, or | 
|---|
| 14 | # (at your option) any later version. | 
|---|
| 15 | # | 
|---|
| 16 | # InnoTek LIBC is distributed in the hope that it will be useful, | 
|---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 19 | # GNU Lesser General Public License for more details. | 
|---|
| 20 | # | 
|---|
| 21 | # You should have received a copy of the GNU Lesser General Public License | 
|---|
| 22 | # along with InnoTek LIBC; if not, write to the Free Software | 
|---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
| 24 | # | 
|---|
| 25 | # | 
|---|
| 26 |  | 
|---|
| 27 | DEPTH = .. | 
|---|
| 28 | include $(PATH_KBUILD)/header.kmk | 
|---|
| 29 |  | 
|---|
| 30 | PROGRAMS = \ | 
|---|
| 31 | pwd_mkdb | 
|---|
| 32 | INSTALLS = baselayout | 
|---|
| 33 |  | 
|---|
| 34 | # | 
|---|
| 35 | # Utility for creating the password database | 
|---|
| 36 | # | 
|---|
| 37 | pwd_mkdb_TEMPLATE = usr.sbin | 
|---|
| 38 | pwd_mkdb_SOURCES  = \ | 
|---|
| 39 | src/pwd_mkdb/pwd_mkdb.c | 
|---|
| 40 |  | 
|---|
| 41 | # | 
|---|
| 42 | # The baselayout | 
|---|
| 43 | # | 
|---|
| 44 | baselayout_DIRS = \ | 
|---|
| 45 | bin \ | 
|---|
| 46 | dev \ | 
|---|
| 47 | etc \ | 
|---|
| 48 | etc/conf.d \ | 
|---|
| 49 | etc/cron.daily \ | 
|---|
| 50 | etc/cron.hourly \ | 
|---|
| 51 | etc/cron.monthly \ | 
|---|
| 52 | etc/cron.weekly \ | 
|---|
| 53 | etc/env.d \ | 
|---|
| 54 | etc/opt \ | 
|---|
| 55 | home \ | 
|---|
| 56 | lib \ | 
|---|
| 57 | opt \ | 
|---|
| 58 | root \ | 
|---|
| 59 | sbin \ | 
|---|
| 60 | tmp \ | 
|---|
| 61 | usr \ | 
|---|
| 62 | usr/bin \ | 
|---|
| 63 | usr/include \ | 
|---|
| 64 | usr/include/asm \ | 
|---|
| 65 | usr/include/linux \ | 
|---|
| 66 | usr/lib \ | 
|---|
| 67 | usr/local \ | 
|---|
| 68 | usr/local/bin \ | 
|---|
| 69 | usr/local/games \ | 
|---|
| 70 | usr/local/include \ | 
|---|
| 71 | usr/local/lib \ | 
|---|
| 72 | usr/local/sbin \ | 
|---|
| 73 | usr/local/share \ | 
|---|
| 74 | usr/local/share/doc \ | 
|---|
| 75 | usr/local/share/man \ | 
|---|
| 76 | usr/local/src \ | 
|---|
| 77 | usr/portage \ | 
|---|
| 78 | usr/sbin \ | 
|---|
| 79 | usr/share/doc \ | 
|---|
| 80 | usr/share/info \ | 
|---|
| 81 | usr/share/man \ | 
|---|
| 82 | usr/share/misc \ | 
|---|
| 83 | usr/src \ | 
|---|
| 84 | var \ | 
|---|
| 85 | var/db/pkg \ | 
|---|
| 86 | var/lib/misc \ | 
|---|
| 87 | var/lock \ | 
|---|
| 88 | var/lock/subsys \ | 
|---|
| 89 | var/log/news \ | 
|---|
| 90 | var/run \ | 
|---|
| 91 | var/spool \ | 
|---|
| 92 | var/state \ | 
|---|
| 93 | var/tmp \ | 
|---|
| 94 |  | 
|---|
| 95 | # For some dirs, we specify mode, uid and/or gid. | 
|---|
| 96 | root_MODE = 0700 | 
|---|
| 97 | tmp_MODE = 1777 | 
|---|
| 98 | var/tmp_MODE = 1777 | 
|---|
| 99 | var/lock_MODE = 0775 | 
|---|
| 100 | #var/lock_UID = root - the egg problem... | 
|---|
| 101 | #var/lock_GID = uucp - the egg problem... | 
|---|
| 102 |  | 
|---|
| 103 | # A few files too. | 
|---|
| 104 | baselayout_SOURCES = \ | 
|---|
| 105 | etc/services=>etc/services \ | 
|---|
| 106 | etc/protocols=>etc/protocols \ | 
|---|
| 107 | etc/master.passwd=>etc/master.passwd \ | 
|---|
| 108 | etc/group=>etc/group \ | 
|---|
| 109 |  | 
|---|
| 110 | # A few symlink (symlink=>target) | 
|---|
| 111 | baselayout_SYMLINKS = \ | 
|---|
| 112 | usr/tmp=>../var/tmp \ | 
|---|
| 113 | usr/doc=>share/doc \ | 
|---|
| 114 | usr/info=>share/info \ | 
|---|
| 115 | usr/man=>share/man \ | 
|---|
| 116 | usr/local/doc=>share/doc \ | 
|---|
| 117 | usr/local/man=>share/man | 
|---|
| 118 |  | 
|---|
| 119 | # fix this!!! | 
|---|
| 120 | baselayout_GOALS = \ | 
|---|
| 121 | $(PATH_INS)/etc/pwd.db | 
|---|
| 122 |  | 
|---|
| 123 |  | 
|---|
| 124 | include $(PATH_KBUILD)/footer.kmk | 
|---|
| 125 |  | 
|---|
| 126 |  | 
|---|
| 127 | # | 
|---|
| 128 | # Rule for creating the password database. | 
|---|
| 129 | # | 
|---|
| 130 | $(PATH_INS)/etc/pwd.db: $(PATH_INS)/etc/master.passwd | $$(TARGET_pwd_mkdb) | 
|---|
| 131 | $(RM) -f $(PATH_INS)/etc/pwd.db.tmp | 
|---|
| 132 | $(TARGET_pwd_mkdb) -p -d $(dir $@) $^ | 
|---|
| 133 |  | 
|---|