增加打包配置
parent
8bde4b078c
commit
cd14bb788b
|
@ -1,6 +1,8 @@
|
||||||
# Hosts切换器
|
# Hosts切换器
|
||||||
> macos & linux专用。windows自己找别的。
|
> macos & linux专用。windows自己找别的。
|
||||||
|
|
||||||
|
![preview](./preview/image.png)
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
添加[`repo.debianx.in`](https://repo.debianx.in)源之后, 可直接使用`apt install hosts-switch`直接安装.
|
添加[`repo.debianx.in`](https://repo.debianx.in)源之后, 可直接使用`apt install hosts-switch`直接安装.
|
||||||
|
|
|
@ -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
|
|
@ -1,10 +1,10 @@
|
||||||
Package: hosts-switch
|
Package: hosts-switch
|
||||||
Version: 3.0.0
|
Version: {{version}}
|
||||||
Section: develop
|
Section: develop
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Yutent <yutent.io@gmail.com>
|
Maintainer: Yutent <yutent.io@gmail.com>
|
||||||
Installed-Size: 0
|
Installed-Size: {{size}}
|
||||||
Depends: python3-webengine-gtk3
|
Depends: python3-webengine-gtk3
|
||||||
Homepage: https://git.wkit.fun/appcat/hosts-switch/
|
Homepage: https://git.wkit.fun/appcat/hosts-switch/
|
||||||
Author: yutent
|
Author: yutent
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
|
@ -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;
|
Loading…
Reference in New Issue