# Building custom filebeat debian

**URL:** <https://discuss.elastic.co/t/building-custom-filebeat-debian/71163>\
**Category:** Beats\
**Created:** [January 11, 2017, 12:29am UTC](https://discuss.elastic.co/t/building-custom-filebeat-debian/71163 "2017-01-11T00:29:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![surajs](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@surajs](https://discuss.elastic.co/u/surajs)\
**Post date:** [January 13, 2017, 1:16am UTC](https://discuss.elastic.co/t/building-custom-filebeat-debian/71163/5 "2017-01-13T01:16:13Z")

</div>

Thanks @steffen for the pointers.

I basically imported the filebeat Makefile to the filebeat repo and added the following to build the debian package I needed.

```
BEAT_DIR=com.abc.xyz/filebeat
ES_BEATS=./vendor/github.com/elastic/beats
GOPACKAGES=$(shell glide novendor)
SNAPSHOT=no
include $(ES_BEATS)/libbeat/scripts/Makefile

```

However, for some reason, i had to comment out the following in libbeat/before\_build.sh file

> ```
> # Install gotpl. Clone and copy needed as go-yaml is behind a proxy which doesn't work
> # with git 1.7
> #git clone https://github.com/tsg/gotpl.git /go/src/github.com/tsg/gotpl
> #mkdir -p /go/src/gopkg.in/yaml.v2
> #cp -r /go/src/github.com/elastic/beats/vendor/gopkg.in/yaml.v2 /go/src/gopkg.in/
> #go install github.com/tsg/gotpl
> 
> ```

and had to install `gotpl` manually to get it working.

---

_[View the full topic](https://discuss.elastic.co/t/building-custom-filebeat-debian/71163)._
