创建包时出错:无法创建目录“/opt/simplest_studio”

创建包时出错:无法创建目录“/opt/simplest_studio”

我正在尝试创建一个 .deb 包。创建了控制和规则文件,按照说明做了所有事情,但在尝试了一万次之后,错误仍然会弹出。$(MAKE) 命令已成功执行并创建了一个二进制文件,但随后发生了一些奇怪的事情。例如,在 '$(MAKE) install' 命令的过程中尝试创建 '/opt/simplest_studio' 目录。我什么都不明白,这是从哪里来的。即,它没有将二进制文件放在我指定的 usr/bin 文件夹中,而是出于某种原因尝试将其安装在 opt 文件夹中。然后不清楚如何在规则文件中设置安装图标和快捷方式以启动应用程序,我试图找到安装快捷方式和图标的示例,但找不到...告诉我该如何处理所有这些问题?

这是包含错误的终端输出:

helg@helg-VirtualBox:~/Create DEB/simplest-studio-1.1$ dpkg-buildpackage -us -uc -rfakeroot
.
.
/usr/bin/make install DESTDIR=/home/helg/Create DEB/simplest-studio-1.1/debian/simplest-studio/usr/bin 
make[1]: Entering directory '/home/helg/Create DEB/simplest-studio-1.1'
mkdir: cannot create directory ‘/opt/simplest_studio’: Permission denied
make[1]: *** [Makefile:1075: install_target] Error 1
make[1]: Leaving directory '/home/helg/Create DEB/simplest-studio-1.1'
make: *** [debian/rules:23: install] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

规则文件:

#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

build:
    $(MAKE)
    #docbook-to-man debian/packagename.sgml > packagename.1

clean:
    dh_testdir
    dh_testroot
    rm -f build-stamp configure-stamp
    $(MAKE) clean
    dh_clean

install: build
    dh_testdir
    dh_testroot
    dh_prep
    dh_installdirs
    # Add here commands to install the package into debian/package
    $(MAKE) install DESTDIR=$(CURDIR)/debian/simplest-studio/usr/bin 

# Build architecture -independent files here.
# binary-indep: build install

# Build architecture -dependent files here.
binary-arch: build install
    dh_testdir
    dh_testroot
    dh_installchangelogs
    dh_installdocs
    dh_installexamples
    dh_install
    dh_installman
    dh_link
    dh_strip
    dh_compress
    dh_fixperms
    dh_installdeb
    dh_shlibdeps
    dh_gencontrol
    dh_md5sums
    dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

相关内容