创建一个任意名称的文件夹。我建议wallpapers
在您的主文件夹中。
在其中创建 2 个文件夹:DEBIAN
和usr
在usr
文件夹中,创建share
. 在那,创建wallpapers
. 把你的壁纸放在那里。
在DEBIAN
文件夹中,创建 2 个文件:control
, 和postinst
.
然后,使控制文件看起来像:
Package: package name
Priority: optional
Section: misc
Maintainer: your name <your@email>
Architecture: all
Version: version number
Depends: whatever it depends on.
Description: a brief description of what your package includes or does.
<blank line here>
Run Code Online (Sandbox Code Playgroud)
注意最后的空行,很重要!
然后,在 postinst
#!/bin/bash
chmod a+r /usr/share/backgrounds/<wallpaper 1>
chmod a+r /usr/share/backgrounds/<wallpaper 2>
chmod a+r /usr/share/backgrounds/<wallpaper n>
# ...
exit 0
Run Code Online (Sandbox Code Playgroud)
对尽可能多的壁纸执行此操作。
保存所有文件。
下一个, sudo chown -R root.root ~/wallpapers/
最后, sudo dpkg -b ~/wallpapers wallpaper.deb
然后,您将其上传到您的 PPA。完毕!
源代码:http : //ubuntuforums.org/showthread.php?t=2034040