-1

我为我的 libspellcheck 库创建了一个 .deb。Debuild 可以正确构建它,但是当我尝试安装它时,没有包含二进制文件。但是,当我执行 $ lesspipe libspellcheck_1.15-0ubuntu1_amd64.deb 时,它会返回:

libspellcheck_1.15-0ubuntu1_amd64.deb:
 new debian package, version 2.0.
 size 138518 bytes: control archive= 770 bytes.
     545 bytes,    12 lines      control              
     577 bytes,     8 lines      md5sums              
 Package: libspellcheck
 Version: 1.15-0ubuntu1
 Architecture: amd64
 Maintainer: Me <me@me.com> (Not Really)
 Installed-Size: 525
 Depends: lib32gcc1 (>= 1:4.1.1), lib32stdc++6 (>= 4.1.1), libc6-i386 (>= 2.4)
 Section: unknown
 Priority: optional
 Homepage: http://libspellcheck.codeplex.com
 Description: The libspellcheck library & spellcheck application
  The libspellcheck C++ static library is designed to check the spelling of a string against a
  dictionary file. The command-line spellcheck application is bundled with this package.

*** Contents:
drwxr-xr-x root/root         0 2013-04-27 17:46 ./
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/etc/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/etc/english.dict/
-rw-r--r-- root/root    442318 2013-04-20 10:21 ./usr/etc/english.dict/english.dict
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/bin/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/bin/spellcheck/
-rwxr-xr-x root/root     18016 2013-04-27 17:46 ./usr/bin/spellcheck/spellcheck
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/lib/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/lib/libspellcheck.a/
-rw-r--r-- root/root     14952 2013-04-27 17:46 ./usr/lib/libspellcheck.a/libspellcheck.a
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/share/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/share/doc/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/share/doc/libspellcheck/
-rw-r--r-- root/root      1229 2013-04-27 16:22 ./usr/share/doc/libspellcheck/copyright
-rw-r--r-- root/root       191 2013-04-27 16:20 ./usr/share/doc/libspellcheck/changelog.Debian.gz
-rw-r--r-- root/root       200 2013-04-27 16:09 ./usr/share/doc/libspellcheck/README.Debian
-rw-r--r-- root/root      1240 2013-01-27 18:53 ./usr/share/doc/libspellcheck/README
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/include/
drwxr-xr-x root/root         0 2013-04-27 17:46 ./usr/include/spellcheck.h/
-rw-r--r-- root/root      1258 2013-04-20 10:21 ./usr/include/spellcheck.h/spellcheck.h

debian 目录中的安装文件如下所示:

spellcheck /usr/bin/spellcheck
libspellcheck.a /usr/lib/libspellcheck.a
spellcheck.h /usr/include/spellcheck.h
english.dict /usr/etc/english.dict

还有我的makefile:

#    SPELLCHECK Makefile
#    Copyright (C) 2013  Ian Duncan
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

all: libspellcheck spellcheck

spellcheck: meta.o spellcheck.o
    g++ -m32 -o spellcheck spellcheck.o meta.o libspellcheck.a

libspellcheck: checker.o
    ar -cvr libspellcheck.a checker.o

spellcheck.o: spellcheck.cpp
    g++ -m32 -Wall -c spellcheck.cpp

meta.o: meta.cpp
    g++ -m32 -Wall -c meta.cpp

checker.o: checker.cpp
    g++ -m32 -Wall -c checker.cpp

clean:
    rm -rf *o

install:
    mkdir -p $(DESTDIR)/usr/etc/
    cp libspellcheck.a $(DESTDIR)$(libdir)/libspellcheck.a
    cp spellcheck.h $(DESTDIR)$(includedir)/spellcheck.h
    cp spellcheck $(DESTDIR)$(bindir)/spellcheck
    cp english.dict $(DESTDIR)/usr/etc/english.dict
    chmod 777 $(DESTDIR)/usr/etc/english.dict


deinstall:
    rm /usr/lib/libspellcheck.a
    rm /usr/include/spellcheck.h
    rm /usr/bin/spellcheck
    rm /usr/etc/english.dict
    rm /usr/local/man/man1/spellcheck.1.gz

我查看了安装文件的 Debian 文档,这对我来说有点模糊。我究竟做错了什么?

编辑:我意识到我不应该将文件名和目录放在安装文件中。我修复了它,它仍然无法正常工作。

4

1 回答 1

1

尝试:

spellcheck /usr/bin
libspellcheck.a /usr/lib
spellcheck.h /usr/include
english.dict /usr/etc

如果您注意到,您的文件是在同名目录下创建的

于 2013-04-27T22:02:15.313 回答