forked from jordansissel/fpm
-
Notifications
You must be signed in to change notification settings - Fork 1
Source: dir
Jordan Sissel edited this page Jul 12, 2013
·
4 revisions
fpm -s dir [other flags] path1 [path2 ...]
The 'dir' source will package up one or more directories for you.
(This is a preview document about a feature to be released in fpm 0.4.40)
Some times you want to take a path and copy it into a package but under a different location.
A simple example of this can be shown with redis. Redis has a config file and an executable. Let's put the executable in /usr/bin and the config file in /etc/redis:
% ls src/redis-server redis.conf
src/redis-server
redis.conf
# install src/redis-server into /usr/bin/
# install redis.conf into /etc/redis/
% fpm -s dir -t deb -n redis --config-files /etc/redis/redis.conf -v 2.6.10 ./src/redis-server=/usr/bin redis.conf=/etc/redis
Created deb package {:path=>"redis_2.6.10_amd64.deb"}
% dpkg -c redis_2.6.10_amd64.deb
drwx------ jls/jls 0 2013-07-11 23:49 ./
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./etc/
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./etc/redis/
-rw-rw-r-- jls/jls 24475 2013-02-11 04:24 ./etc/redis/redis.conf
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./usr/
drwxrwxr-x jls/jls 0 2013-07-11 23:49 ./usr/bin/
-rwxrwxr-x jls/jls 3566152 2013-02-14 11:19 ./usr/bin/redis-server
# Did the conffiles setting work? Yep!
% dpkg-deb -e redis_2.6.10_amd64.deb .
% cat conffiles
/etc/redis/redis.conf
Voila!