<commit_before>require 'formula'

class Apg <Formula
  url 'http://www.adel.nursat.kz/apg/download/apg-2.2.3.tar.gz'
  homepage 'http://www.adel.nursat.kz/apg/'
  md5 '3b3fc4f11e90635519fe627c1137c9ac'

  def patches
    DATA
  end

  def install
#    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    system "make standalone"
    system "make install INSTALL_PREFIX=#{prefix}"
  end
end

__END__
--- ./Makefile.old	2010-02-09 16:47:32.000000000 +0200
+++ ./Makefile	2010-02-09 16:47:44.000000000 +0200
@@ -13,8 +13,6 @@
 #
 # You should comment the line below ('LIBS= -lcrypt')for QNX RTP
 # 6.1.0, OpenBSD 2.8 and above, WIN32 (+MinGW)
-LIBS = -lcrypt
-LIBM = -lm
 # Use lines below for cygwin
 # LIBS = 
 # LIBM =
@@ -109,23 +107,25 @@
 	strip ${CS_PROGNAME}
 	strip ${BFM_PROGNAME}
 
+.PHONY: install
+
 install:
 	if test -x ./apg; then \
 ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
 ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
-./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
+./install-sh -c -m 0755 ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \
 ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
 fi
 	if test -x ./apgd; then \
 ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
 ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
-./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
+./install-sh -c -m 0755 ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \
 ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \
 fi
 	if test -x ./apgbfm; then \
 ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
 ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \
-./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
+./install-sh -c -m 0755 ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \
 ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \
 fi<commit_msg>apg - use manual install steps and clear more Makefile flags<commit_after>require 'formula'

class Apg <Formula
  url 'http://www.adel.nursat.kz/apg/download/apg-2.2.3.tar.gz'
  homepage 'http://www.adel.nursat.kz/apg/'
  md5 '3b3fc4f11e90635519fe627c1137c9ac'

  def install
    inreplace "Makefile" do |s|
      s.remove_make_var! ["CC", "FLAGS", "LIBS", "LIBM"]
    end
    
    system "make standalone"
    
    # Install manually
    bin.install "apg"
    man1.install "doc/man/apg.1"
    
    bin.install "apgbfm"
    man1.install "doc/man/apgbfm.1"
  end
end
{'fraction_non_alphanumeric': 0.17997662641215426, 'fraction_numerical': 0.06622516556291391, 'mean_word_length': 3.301507537688442, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '77992', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1077, 'n_words': 221}