Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakub Panek
aports
Commits
00adab64
Commit
00adab64
authored
15 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
alpine.mk: support for profiles
renamed default package list to alpine.packages
parent
0047d5ef
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
alpine.mk
+26
-10
26 additions, 10 deletions
alpine.mk
alpine.packages
+0
-0
0 additions, 0 deletions
alpine.packages
with
26 additions
and
10 deletions
alpine.mk
+
26
−
10
View file @
00adab64
#!/usr/bin/make -f
-include
alpine.conf.mk
PROFILE
?=
alpine
-include
$(PROFILE).conf.mk
BUILD_DATE
:=
$(
shell
date
+%y%m%d
)
ALPINE_RELEASE
?=
$(
BUILD_DATE
)
ALPINE_NAME
?=
alpine-test
ALPINE_ARCH
:=
i386
DESTDIR
?=
$(
shell
pwd
)
/isotmp
DESTDIR
?=
$(
shell
pwd
)
/isotmp
.
$(
PROFILE
)
MKCRAMFS
=
mkcramfs
SUDO
=
sudo
...
...
@@ -16,6 +18,8 @@ ISO_LINK ?= $(ALPINE_NAME).iso
ISO_DIR
:=
$(
DESTDIR
)
/isofs
ISO_PKGDIR
:=
$(
ISO_DIR
)
/apks
APKS
?=
$(
shell
sed
's/\#.*//; s/\*/\\*/g'
$(
PROFILE
)
.packages
)
APK_OPTS
:=
$(
addprefix
--repository
,
$(
APK_REPOS
))
--keys-dir
/etc/apk/keys
find_apk_ver
=
$(
shell apk search
$(
APK_OPTS
)
$(
1
)
|
sort
|
uniq
)
...
...
@@ -86,12 +90,14 @@ $(APK_FILES):
#
MODLOOP
:=
$(
ISO_DIR
)
/boot/
$(
KERNEL_NAME
)
.cmg
MODLOOP_DIR
:=
$(
DESTDIR
)
/modloop
MODLOOP_KERNELSTAMP
:=
$(
DESTDIR
)
/stamp.modloop.kernel
MODLOOP_DIRSTAMP
:=
$(
DESTDIR
)
/stamp.modloop
MODLOOP_PKGS
:=
$(
KERNEL_PKGNAME
)
$(
addsuffix -
$(
KERNEL_FLAVOR
)
, dahdi-linux iscsitarget xtables-addons
)
MODLOOP_EXTRA
?=
$(
addsuffix -
$(
KERNEL_FLAVOR
)
, dahdi-linux iscsitarget xtables-addons
)
MODLOOP_PKGS
=
$(
KERNEL_PKGNAME
)
$(
MODLOOP_EXTRA
)
modloop
:
$(MODLOOP)
$(MODLOOP_
DIR
STAMP)
:
$(MODLOOP_
KERNEL
STAMP)
:
@
echo
"==> modloop: Unpacking kernel modules"
;
@
rm
-rf
$(
MODLOOP_DIR
)
@
mkdir
-p
$(
MODLOOP_DIR
)
/lib/modules/
...
...
@@ -99,8 +105,13 @@ $(MODLOOP_DIRSTAMP):
apk fetch
$(
APK_OPTS
)
--stdout
$$
i
\
|
tar
-C
$(
MODLOOP_DIR
)
-xz
;
\
done
@
cp
$(
MODLOOP_DIR
)
/usr/share/
$(
KERNEL_PKGNAME
)
/kernel.release
$@
MODLOOP_KERNEL_RELEASE
=
$(
shell
cat
$(
MODLOOP_KERNELSTAMP
))
$(MODLOOP_DIRSTAMP)
:
$(MODLOOP_KERNELSTAMP)
@
rm
-rf
$(
addprefix
$(
MODLOOP_DIR
)
/lib/modules/
*
/,
source
build
)
@
depmod
$(
KERNEL
)
-b
$(
MODLOOP_DIR
)
@
depmod
$(
MODLOOP_KERNEL_RELEASE
)
-b
$(
MODLOOP_DIR
)
@
touch
$(
MODLOOP_DIRSTAMP
)
$(MODLOOP)
:
$(MODLOOP_DIRSTAMP)
...
...
@@ -109,7 +120,7 @@ $(MODLOOP): $(MODLOOP_DIRSTAMP)
@$(
MKCRAMFS
)
$(
MODLOOP_DIR
)
/lib
$(
MODLOOP
)
clean-modloop
:
@
rm
-rf
$(
MODLOOP_DIR
)
$(
MODLOOP_DIRSTAMP
)
$(
MODLOOP
)
@
rm
-rf
$(
MODLOOP_DIR
)
$(
MODLOOP_DIRSTAMP
)
$(
MODLOOP_PKGSTAMP
)
$(
MODLOOP
)
#
# Initramfs rules
...
...
@@ -137,9 +148,9 @@ $(INITFS_DIRSTAMP):
@
touch
$@
#$(INITFS): $(shell mkinitfs -F "$(INITFS_FEATURES)" -l $(KERNEL))
$(INITFS)
:
$(INITFS_DIRSTAMP)
$(INITFS)
:
$(INITFS_DIRSTAMP)
$(MODLOOP_DIRSTAMP)
@
mkinitfs
-F
"
$(
INITFS_FEATURES
)
"
-t
$(
INITFS_TMP
)
\
-b
$(
INITFS_DIR
)
-o
$@
$(
KERNEL
)
-b
$(
INITFS_DIR
)
-o
$@
$(
MODLOOP_KERNEL_RELEASE
)
clean-initfs
:
@
rm
-rf
$(
INITFS
)
$(
INITFS_DIRSTAMP
)
$(
INITFS_DIR
)
...
...
@@ -186,7 +197,7 @@ $(ISOLINUX_CFG):
@
echo
" kernel /boot/
$(
KERNEL_NAME
)
"
>>
$(
ISOLINUX_CFG
)
@
echo
" append initrd=/boot/
$(
KERNEL_NAME
)
.gz alpine_dev=cdrom:iso9660 modules=loop,cramfs,sd-mod,usb-storage,floppy quiet"
>>
$(
ISOLINUX_CFG
)
$(SYSLINUX_CFG)
:
$(SYSLINUX_CFG)
:
$(MODLOOP_DIRSTAMP)
@
echo
"==> iso: configure syslinux"
@
echo
"timeout 20"
>
$@
@
echo
"prompt 1"
>>
$@
...
...
@@ -195,6 +206,9 @@ $(SYSLINUX_CFG):
@
echo
" kernel /boot/
$(
KERNEL_NAME
)
"
>>
$@
@
echo
" append initrd=/boot/
$(
KERNEL_NAME
)
.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet"
>>
$@
clean-syslinux
:
@
rm
-f
$(
SYSLINUX_CFG
)
$(
ISOLINUX_CFG
)
$(
ISOLINUX_BIN
)
ISO_KERNEL
:=
$(
ISO_DIR
)
/boot/
$(
KERNEL_NAME
)
ISO_REPOS_DIRSTAMP
:=
$(
DESTDIR
)
/stamp.isorepos
ISOFS_DIRSTAMP
:=
$(
DESTDIR
)
/stamp.isofs
...
...
@@ -209,11 +223,13 @@ $(ISO_PKGDIR)/APKINDEX.tar.gz: $(APK_FILES)
-o
$@
$(
ISO_PKGDIR
)
/
*
.apk
@
abuild-sign
$@
$(ISO_KERNEL)
:
$(ISO_KERNEL)
:
$(MODLOOP_DIRSTAMP)
@
echo
"==> iso: install kernel
$(
KERNEL
)
"
@
mkdir
-p
$(
dir
$(
ISO_KERNEL
))
@
apk fetch
$(
APK_OPTS
)
--stdout
$(
KERNEL_PKGNAME
)
\
|
tar
-C
$(
ISO_DIR
)
-xz
boot
@
rm
-f
$(
ISO_DIR
)
/boot/
$(
KERNEL_NAME
)
@
ln
-s
vmlinuz-
$(
MODLOOP_KERNEL_RELEASE
)
$@
@
rm
-rf
$(
ISO_DIR
)
/.[A-Z]
*
$(
ISO_DIR
)
/.[a-z]
*
$(
ISO_DIR
)
/lib
$(ISOFS_DIRSTAMP)
:
$(MODLOOP) $(INITFS) $(ISOLINUX_CFG) $(ISOLINUX_BIN) $(ISO_KERNEL) $(ISO_REPOS_DIRSTAMP) $(SYSLINUX_CFG)
...
...
This diff is collapsed.
Click to expand it.
packages
→
alpine.
packages
+
0
−
0
View file @
00adab64
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment