增加打包配置

master
yutent 2023-09-05 14:47:35 +08:00
parent 8bde4b078c
commit cd14bb788b
7 changed files with 46 additions and 2 deletions

View File

@ -1,6 +1,8 @@
# Hosts切换器
> macos & linux专用。windows自己找别的。
![preview](./preview/image.png)
## 安装
添加[`repo.debianx.in`](https://repo.debianx.in)源之后, 可直接使用`apt install hosts-switch`直接安装.

33
build.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
if [ -d unpack ]; then
sudo rm -rf unpack
fi
version="3.0.0"
mkdir -p unpack/DEBIAN
cp debian/control unpack/DEBIAN/
cp -r usr unpack/
mkdir -p unpack/usr/share/icons/hicolor/128x128/apps
mkdir -p unpack/usr/share/icons/hicolor/256x256/apps
cp icons/128x128.png unpack/usr/share/icons/hicolor/128x128/apps/hosts-switch.png
cp icons/256x256.png unpack/usr/share/icons/hicolor/256x256/apps/hosts-switch.png
cd unpack
find usr -type f | xargs md5sum > DEBIAN/md5sums
_size=$(du -d 0 usr | cut -f1)
du -d 0 usr
echo $_size
sed -i "s/{{size}}/${_size}/" DEBIAN/control
sed -i "s/{{version}}/${version}/" DEBIAN/control
cd ..
dpkg-deb -b unpack/ "hosts-switch-${version}.deb"
sudo rm -rf unpack

4
debian/control vendored
View File

@ -1,10 +1,10 @@
Package: hosts-switch
Version: 3.0.0
Version: {{version}}
Section: develop
Architecture: all
Priority: optional
Maintainer: Yutent <yutent.io@gmail.com>
Installed-Size: 0
Installed-Size: {{size}}
Depends: python3-webengine-gtk3
Homepage: https://git.wkit.fun/appcat/hosts-switch/
Author: yutent

BIN
hosts-switch-3.0.0.deb Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
preview/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Hosts Switch
Comment[zh_CN]=Hosts文件修改器
Exec=hosts-switch
Icon=hosts-switch
Terminal=false
X-MultipleArgs=false
Type=Application
Categories=Development;