Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adélie Linux
abuild
Commits
3d79fb70
Commit
3d79fb70
authored
May 08, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use .in files for scripts
parent
4aee935d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
25 deletions
+75
-25
Makefile
Makefile
+39
-8
abuild.in
abuild.in
+36
-17
buildrepo.in
buildrepo.in
+0
-0
devbuild.in
devbuild.in
+0
-0
mkalpine.in
mkalpine.in
+0
-0
No files found.
Makefile
View file @
3d79fb70
PACKAGE
=
abuild
VERSION
:=
$(
shell
awk
-F
=
'$$1 == "abuild_ver" {print $$2
}
'
abuild
)
USR_BIN_FILES
=
abuild devbuild mkalpine buildrepo
SAMPLES
=
sample.APKBUILD sample.initd sample.confd sample.pre-install
\
sample.post-install
DISTFILES
=
$(USR_BIN_FILES)
$(SAMPLES)
Makefile abuild.conf initramfs-init
\
PACKAGE
:=
abuild
VERSION
:=
1.14
prefix
?=
/usr
sysconfdir
?=
/etc
datadir
?=
$(prefix)
/share/
$(PACKAGE)
USR_BIN_FILES
:=
abuild devbuild mkalpine buildrepo
SAMPLES
:=
sample.APKBUILD sample.initd sample.confd
\
sample.pre-install sample.post-install
SCRIPTS
:=
$(USR_BIN_FILES)
SCRIPT_SOURCES
:=
$(
addsuffix
.in,
$(SCRIPTS)
)
DISTFILES
=
$(SCRIPT_SOURCES)
$(SAMPLES)
Makefile abuild.conf
GIT_REV
:=
$(
shell
test
-d
.git
&&
git describe
||
echo
exported
)
ifneq
($(GIT_REV), exported)
FULL_VERSION
:=
$(
patsubst
$(PACKAGE)
-%,%,
$(GIT_REV)
)
FULL_VERSION
:=
$(
patsubst
v%,%,
$(FULL_VERSION)
)
else
FULL_VERSION
:=
$(VERSION)
endif
SED
:=
sed
TAR
:=
tar
SED_REPLACE
:=
-e
's:@VERSION@:
$(FULL_VERSION)
:g'
\
-e
's:@prefix@:
$(prefix)
:g'
\
-e
's:@sysconfdir@:
$(sysconfdir)
:g'
\
-e
's:@datadir@:
$(datadir)
:g'
.SUFFIXES
:
.sh.in .in
.sh.in.sh
:
${SED}
${SED_REPLACE}
${SED_EXTRA}
$<
>
$@
.in
:
${SED}
${SED_REPLACE}
${SED_EXTRA}
$<
>
$@
P
=
$(PACKAGE)
-
$(VERSION)
all
:
$(SCRIPTS)
help
:
@
echo
"
$(P)
makefile"
@
echo
"usage: make install [ DESTDIR=<path> ]"
...
...
@@ -29,7 +61,6 @@ install: $(USR_BIN_FILES) $(SAMPLES) abuild.conf functions.sh
fi
cp
$(SAMPLES)
$(DESTDIR)
/
$(prefix)
/share/abuild
cp
functions.sh
$(DESTDIR)
/
$(datadir)
/
cp
initramfs-init
$(DESTDIR)
/
$(datadir)
/
dist
:
$(P).tar.bz2
...
...
abuild
→
abuild
.in
View file @
3d79fb70
...
...
@@ -8,7 +8,8 @@
# Depends on: busybox utilities, fakeroot,
#
abuild_ver
=
1.14
abuild_ver
=
@VERSION@
sysconfdir
=
@sysconfdir@
startdir
=
"
$PWD
"
srcdir
=
${
srcdir
:-
"
$startdir
/src"
}
...
...
@@ -27,23 +28,45 @@ SUDO=${SUDO:-"sudo"}
default_cmds
=
"sanitycheck builddeps clean fetch unpack rootpkg"
# read config
ABUILD_CONF
=
${
ABUILD_CONF
:-
"
/etc
/abuild.conf"
}
ABUILD_CONF
=
${
ABUILD_CONF
:-
"
$sysconfdir
/abuild.conf"
}
[
-f
"
$ABUILD_CONF
"
]
&&
.
"
$ABUILD_CONF
"
# source functions
datadir
=
/usr/share/abuild
# if abuild was not run from PATH, then look for func lib at same location
if
[
-z
"
$FUNCLIB
"
]
;
then
FUNCLIB
=
"
${
0
##/*
}
/functions.sh"
[
-f
"
$FUNCLIB
"
]
||
FUNCLIB
=
$datadir
/functions.sh
fi
#colors
if
[
-n
"
$USE_COLORS
"
]
;
then
NORMAL
=
"
\0
33[1;0m"
STRONG
=
"
\0
33[1;1m"
RED
=
"
\0
33[1;31m"
GREEN
=
"
\0
33[1;32m"
YELLOW
=
"
\0
33[1;33m"
BLUE
=
"
\0
33[1;34m"
fi
# functions
msg
()
{
local
prompt
=
"
$GREEN
>>>
${
NORMAL
}
"
local
fake
=
"
${
FAKEROOTKEY
:+
${
BLUE
}
*
${
NORMAL
}}
"
local
name
=
"
${
STRONG
}${
subpkgname
:-
$pkgname
}${
NORMAL
}
"
[
-z
"
$quiet
"
]
&&
printf
"
${
prompt
}
${
name
}${
fake
}
:
$@
\n
"
>
&2
}
warning
()
{
local
prompt
=
"
${
YELLOW
}
>>> WARNING:
${
NORMAL
}
"
local
fake
=
"
${
FAKEROOTKEY
:+
${
BLUE
}
*
${
NORMAL
}}
"
local
name
=
"
${
STRONG
}${
subpkgname
:-
$pkgname
}${
NORMAL
}
"
printf
"
${
prompt
}
${
name
}${
fake
}
:
$@
\n
"
>
&2
}
error
()
{
local
prompt
=
"
${
RED
}
>>> ERROR:
${
NORMAL
}
"
local
fake
=
"
${
FAKEROOTKEY
:+
${
BLUE
}
*
${
NORMAL
}}
"
local
name
=
"
${
STRONG
}${
subpkgname
:-
$pkgname
}${
NORMAL
}
"
printf
"
${
prompt
}
${
name
}${
fake
}
:
$@
\n
"
>
&2
}
if
!
[
-f
"
$FUNCLIB
"
]
;
then
echo
"
$FUNCLIB
: not found"
>
&2
exit
1
fi
.
"
$FUNCLIB
"
set_xterm_title
()
{
if
[
"
$TERM
"
=
xterm
]
;
then
...
...
@@ -190,11 +213,7 @@ unpack() {
clean
()
{
msg
"Cleaning temporary build dirs..."
rm
-rf
"
$srcdir
"
rm
-rf
"
$pkgdir
"
local
i
for
i
in
$subpackages
;
do
rm
-rf
"
$pkgdir
-
$(
get_split_func
$i
)
"
done
rm
-rf
"
$pkgdirbase
"
}
# cleanup fetched sources
...
...
buildrepo
→
buildrepo
.in
View file @
3d79fb70
File moved
devbuild
→
devbuild
.in
View file @
3d79fb70
File moved
mkalpine
→
mkalpine
.in
View file @
3d79fb70
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment