Ubuntu 软件中心的包装壁纸

rst*_*r78 7 software-center wallpaper

我想知道如何将一些壁纸打包到 Ubuntu 软件中心的包中?

Kaz*_*lfe 6

创建一个任意名称的文件夹。我建议wallpapers在您的主文件夹中。

在其中创建 2 个文件夹:DEBIANusr

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