Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

临时 #11

Open
maboloshi opened this issue Feb 28, 2020 · 4 comments
Open

临时 #11

maboloshi opened this issue Feb 28, 2020 · 4 comments

Comments

@maboloshi
Copy link
Owner

maboloshi commented Feb 28, 2020

miktex 打包测试(人工)

构建 builder 环境

docker docker build -t maboloshi/miktex-builder:latest -f Dockerfile_builder

注意:国内网络环境构建建议参考#国内镜像源设置 设置国内镜像源

编译和打包测试

docker run --name builder -it \
    -v "$PWD:/home/builder/" \
    -v "$PWD/packages:/home/builder/packages"
    --entrypoint /bin/ash \
    maboloshi/miktex-builder:latest

如果在docker for windows下构建,请将上述$PWD等主机路径改成windows格式的绝对路径
You can also run the builder anywhere. You just need to mount your package source and build directories to /home/builder/package and /packages, respectively.

进入docker环境后

mkdir work
cp APKBUILD work/
cd work

#进行分步骤测试
#APKBUILD文件语法检查
abuild sanitycheck
#校验
abuild verify
#创建校验(如果不存在)
abuild checksum
#分析和安装依赖
abuild deps
#获取源代码
abuild fetch
#编译前准备
abuild prepare
#编译
abuild build
#check
abuild check
#打包
abuild rootpkg

直到调试到不报错基本就OK了
最后可以直接使用abuild -r进行完整测试
APK默认输出路径:/home/build/packages/builder/x86_64/miktex-2.9.7300-r1.apk

国内镜像源设置

Apline 镜像源设置

编辑Dockerfile添加sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \

miktex 镜像源设置:

编辑APKBUILD文件在-DWITH_MAN_PAGES=FALSE \下添加:
-DMIKTEX_DEFAULT_REPOSITORY=https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/win32/miktex/tm/packages/ \

@maboloshi
Copy link
Owner Author

/home/build/packages/builder/x86_64/`miktex-2.9.7300-r1.apk
/home/builder/packages/home/x86_64/miktex-2.9.7300-r1.apk

@maboloshi
Copy link
Owner Author

docker build --target builder -t maboloshi/miktex-builder:builder .
/home/builder/packages/home/x86_64/miktex-2.9.7300-r1.apk
docker run -it
--entrypoint /bin/ash
maboloshi/miktex-builder:builder

@maboloshi
Copy link
Owner Author

docker build -t maboloshi/miktex-builder:latest -f Dockerfile .
docker run --name builder1 -it
-v "E:\【A_工程目录】\miktex-builder:/home/builder/work"
--entrypoint /bin/ash
maboloshi/miktex-builder:latest

@maboloshi
Copy link
Owner Author

maboloshi commented Feb 28, 2020

默认包生成路径

mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
cat control.tar.gz data.tar.gz > "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$apk

https://git.alpinelinux.org/abuild/tree/abuild.in#n1637

默认$REPODEST ~/packages
$repo实际表示APKBUILD所在的当前目录

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant