grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

how make deb package #437

Closed artb1sh closed 2 years ago

artb1sh commented 3 years ago

Hello. make is not create deb package How can i build package for debian? I need 3.7.2 version of your program. Can you help me

grobian commented 3 years ago

I've no idea how debian builds packages

deniszh commented 3 years ago

@artb1sh : IIRC carbon-c-relay already included in debian repos - https://packages.debian.org/sid/carbon-c-relay

jdblack commented 2 years ago

We use FPM to build Debs of carbon-c-relay for the particular distro and version that we use. This does not have anywhere near all of the pieces that you need (systemd unit file, for example), but it slots in well with our chef infrastructure.

recipe.rb

VERSION='3.7.4'

class GoCarbon < FPM::Cookery::Recipe
  homepage    'https://https://github.com/grobian/carbon-c-relay'
  name        'carbon-c-relay'
  version     VERSION
  description 'carbon-go-relay'
  maintainer  'James Blackwell <james.blackwell@xxxxxxxxx.com>'
  source      'https://github.com/grobian/carbon-c-relay.git', with: :git, tag: "v#{VERSION}"

  post_install 'post_install'

  def build
    safesystem 'chmod +x configure'
    safesystem './configure'
    safesystem 'make'
  end

  def install
    safesystem "chmod +x relay"
    bin.install "relay"
  end
end

post_install

#!/bin/sh

chmod +x /usr/bin/relay

if [ "$upgrade" = "true" ]; then
  echo ""
  echo "carbon-c-relay does NOT restart start automatically!"
  echo ""
fi

exit 0
grobian commented 2 years ago

I think building deb or rpm packages is out of the scope of this project